diff --git a/Makefile.in b/Makefile.in index ef55a07be..2d67d7201 100644 --- a/Makefile.in +++ b/Makefile.in @@ -117,9 +117,15 @@ realclean: distclean check: cd build && $(MAKE) check TESTS="$(TESTS)" +cross-check: + cd build && $(MAKE) cross-check TESTS="$(TESTS)" + ansi-test: cd build && $(MAKE) ansi-test +cross-ansi-test: + cd build && $(MAKE) cross-ansi-test + # ==================== Various means of distribution ==================== TAR_DIR=ecl-$(VERSION) diff --git a/contrib/bytecmp/bytecmp.lsp b/contrib/bytecmp/bytecmp.lsp index 3e5064020..c124432be 100755 --- a/contrib/bytecmp/bytecmp.lsp +++ b/contrib/bytecmp/bytecmp.lsp @@ -125,13 +125,18 @@ (si::load-bytecodes output-file *compile-verbose* *load-print* :default)) (values (truename output-file) nil nil)) +(defun bc-do-compilation-unit (closure &key override) + (declare (ignore override)) + (funcall closure)) + (defun install-bytecodes-compiler () (ext::package-lock (find-package :cl) nil) (pushnew :ecl-bytecmp *features*) (setf (fdefinition 'disassemble) #'bc-disassemble (fdefinition 'compile) #'bc-compile (fdefinition 'compile-file) #'bc-compile-file - (fdefinition 'compile-file-pathname) #'bc-compile-file-pathname) + (fdefinition 'compile-file-pathname) #'bc-compile-file-pathname + (fdefinition 'si::do-compilation-unit) #'bc-do-compilation-unit) (ext::package-lock (find-package :cl) t)) (defun install-c-compiler () diff --git a/src/Makefile.in b/src/Makefile.in index 6a7b93473..78f1da4f9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -201,9 +201,12 @@ install: $(INSTALL_DATA) ecl/$$i $(DESTDIR)$(includedir)/ecl/$$i; \ done $(INSTALL_SCRIPT) bin/ecl-config $(DESTDIR)$(bindir) - for i in build-stamp help.doc TAGS ; do \ + for i in build-stamp help.doc TAGS; do \ $(INSTALL_DATA) $$i $(DESTDIR)$(ecldir); \ done + if [ -f target-info.lsp ]; then \ + $(INSTALL_DATA) target-info.lsp $(DESTDIR)$(ecldir); \ + fi for i in $(LSP_LIBRARIES) $(LIBRARIES); do \ if test -s $$i ; then \ if echo $$i | grep dll; then \ @@ -273,9 +276,15 @@ test_changes: check: cd tests && $(MAKE) clean && $(MAKE) check TESTS="$(TESTS)" +cross-check: + cd tests && $(MAKE) clean && $(MAKE) cross-check TESTS="$(TESTS)" + ansi-test: cd tests && $(MAKE) clean && $(MAKE) ansi-test +cross-ansi-test: + cd tests && $(MAKE) clean && $(MAKE) cross-ansi-test + # # Rebuild ECL using its own image and compare. Does not work # right now. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 28c7ffd7c..71cac3f87 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -252,6 +252,7 @@ AC_SUBST(ARCHITECTURE)dnl Type of processor for which this is compiled AC_SUBST(SOFTWARE_TYPE)dnl Type of operating system AC_SUBST(SOFTWARE_VERSION)dnl Version number of operating system AC_SUBST(MACHINE_VERSION)dnl Version of the machine +AC_SUBST(TARGET_IDENTIFIER)dnl Target identifier for cross compilation AC_SUBST(ECL_LDRPATH)dnl Sometimes the path for finding DLLs must be hardcoded. AC_SUBST(LIBPREFIX)dnl Name components of a statically linked library @@ -446,8 +447,10 @@ case "${host_os}" in ECL_ADD_FEATURE([win32]) ECL_ADD_FEATURE([windows]) if test "x$host_cpu" = "xx86_64" ; then - ECL_ADD_FEATURE([win64]) + ECL_ADD_FEATURE([win64]) fi + AC_CHECK_TOOL([WINDRES],[windres]) # set variable WINDRES to appropriate `windres' program + AC_SUBST(WINDRES) ;; darwin*) thehost='darwin' @@ -611,6 +614,7 @@ AC_MSG_CHECKING(for required libraries) AC_MSG_RESULT([${clibs}]) AC_MSG_CHECKING(for architecture) ARCHITECTURE=`echo "${host_cpu}" | tr a-z A-Z` # i386 -> I386 +TARGET_IDENTIFIER="${host}" AC_MSG_RESULT([${ARCHITECTURE}]) AC_MSG_CHECKING(for software type) SOFTWARE_TYPE="$thehost" @@ -797,21 +801,7 @@ int main() { int bits; FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - if (sizeof(int) >= sizeof(void*)) { - unsigned int t = 1; - signed int l = 0; - int_type="int"; - for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1); - l = (~l) << (bits - 3); -#if 1 - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-(l+1)); -#else - l++; - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-l); -#endif - } else if (sizeof(long) >= sizeof(void*)) { + if (sizeof(long) >= sizeof(void*)) { unsigned long int t = 1; signed long int l = 0; int_type="long int"; diff --git a/src/bare.lsp.in b/src/bare.lsp.in index a68c3811a..bfd3575cc 100644 --- a/src/bare.lsp.in +++ b/src/bare.lsp.in @@ -47,6 +47,8 @@ ;;; (when (member "CROSS" *features* :test #'string-equal) + ;; List of target dependent constants. Must be kept in sync with the + ;; cross compilation setup in compile.lsp.in (sys:*make-constant 'most-negative-fixnum (parse-integer "@CL_FIXNUM_MIN@" :junk-allowed t)) (sys:*make-constant 'most-positive-fixnum (parse-integer "@CL_FIXNUM_MAX@" :junk-allowed t)) (sys:*make-constant 'cl-fixnum-bits @CL_FIXNUM_BITS@) diff --git a/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp b/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp index 673f6ed69..cf721d39e 100644 --- a/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp +++ b/src/cmp/cmpbackend-cxx/cmpbackend-cxx.lsp @@ -103,7 +103,8 @@ the environment variable TMPDIR to a different value." template)) #+msvc (defun linker-cc (o-pathname object-files &key (type :program) - (ld-flags (split-program-options (if #-dlopen nil #+dlopen (eq type :program) + (ld-flags (split-program-options (if (and (member :dlopen *features*) + (eq type :program)) *ld-program-flags* *ld-flags*))) (ld-libs (split-program-options *ld-libs*))) @@ -128,7 +129,8 @@ the environment variable TMPDIR to a different value." template)) #-msvc (defun linker-cc (o-pathname object-files &key (type :program) - (ld-flags (split-program-options (if #-dlopen nil #+dlopen (eq type :program) + (ld-flags (split-program-options (if (and (member :dlopen *features*) + (eq type :program)) *ld-program-flags* *ld-flags*))) (ld-libs (split-program-options *ld-libs*))) @@ -279,9 +281,10 @@ the environment variable TMPDIR to a different value." template)) (defun ecl-library-directory () "Finds the directory in which the ECL core library was installed." (cond ((and *ecl-library-directory* - (probe-file (merge-pathnames (compile-file-pathname "ecl" :type - #+dlopen :shared-library - #-dlopen :static-library) + (probe-file (merge-pathnames (compile-file-pathname + "ecl" :type (if (member :dlopen *features*) + :shared-library + :static-library)) *ecl-library-directory*))) *ecl-library-directory*) ((probe-file "SYS:BUILD-STAMP") @@ -360,7 +363,6 @@ filesystem or in the database of ASDF modules." ;;; Target-specific invocations. -#+dlopen (defun shared-cc (o-pathname object-files) (let ((ld-flags (split-program-options *ld-shared-flags*)) (ld-libs (split-program-options *ld-libs*))) @@ -375,12 +377,11 @@ filesystem or in the database of ASDF modules." (list (concatenate 'string "/LIBPATH:" (ecl-library-directory)) (concatenate 'string "/IMPLIB:" implib))))) - #+mingw32 - (setf ld-flags (list* "-shared" ld-flags)) + (when (member :mingw32 *features*) + (setf ld-flags (list* "-shared" ld-flags))) (linker-cc o-pathname object-files :type :dll :ld-flags ld-flags :ld-libs ld-libs))) -#+dlopen (defun bundle-cc (o-pathname init-name object-files) (declare (ignore init-name)) (let ((ld-flags (split-program-options *ld-bundle-flags*)) @@ -399,8 +400,8 @@ filesystem or in the database of ASDF modules." (concatenate 'string "/LIBPATH:" (ecl-library-directory)) (concatenate 'string "/IMPLIB:" implib))))) - #+mingw32 - (setf ld-flags (list* "-shared" "-Wl,--export-all-symbols" ld-flags)) + (when (member :mingw32 *features*) + (setf ld-flags (list* "-shared" "-Wl,--export-all-symbols" ld-flags))) (linker-cc o-pathname object-files :type :fasl :ld-flags ld-flags :ld-libs ld-libs))) @@ -508,7 +509,6 @@ extern int } ") -#+:win32 (defconstant +lisp-program-winmain+ " #include int @@ -570,7 +570,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS (main-name nil) (prologue-code "") (epilogue-code (when (eq target :program) '(SI::TOP-LEVEL T))) - #+:win32 (system :console) + (system :console) &aux (*suppress-compiler-messages* (or *suppress-compiler-messages* (not *compile-verbose*))) @@ -678,10 +678,9 @@ output = si_safe_eval(2, ecl_read_from_cstring(lisp_code), ECL_NIL); ;; we don't need wrapper in the program, we have main for that ;(format c-file +lisp-init-wrapper+ wrap-name init-name) (format c-file - #+:win32 (ecase system - (:console +lisp-program-main+) - (:windows +lisp-program-winmain+)) - #-:win32 +lisp-program-main+ + (ecase system + (:console +lisp-program-main+) + (:windows +lisp-program-winmain+)) prologue-code init-name epilogue-code) (close c-file) (compiler-cc c-name o-name) @@ -698,7 +697,6 @@ output = si_safe_eval(2, ecl_read_from_cstring(lisp_code), ECL_NIL); (compiler-cc c-name o-name) (when (probe-file output-name) (delete-file output-name)) (linker-ar output-name o-name ld-libs)) - #+dlopen (:shared-library (format c-file +lisp-program-init+ init-name init-tag prologue-code submodules epilogue-code) @@ -710,7 +708,6 @@ output = si_safe_eval(2, ecl_read_from_cstring(lisp_code), ECL_NIL); (compiler-cc c-name o-name) (shared-cc output-name (append ld-flags (list o-name) ld-libs))) - #+dlopen (:fasl (format c-file +lisp-program-init+ init-name init-tag prologue-code submodules epilogue-code) @@ -735,7 +732,6 @@ output = si_safe_eval(2, ecl_read_from_cstring(lisp_code), ECL_NIL); (apply #'builder :static-library args)) (defun build-shared-library (&rest args) - #-dlopen - (error "Dynamically loadable libraries not supported in this system.") - #+dlopen - (apply #'builder :shared-library args)) + (if (member :dlopen *features*) + (apply #'builder :shared-library args) + (error "Dynamically loadable libraries not supported in this system."))) diff --git a/src/cmp/cmpbackend-cxx/cmpc-inl-sysfun.lsp b/src/cmp/cmpbackend-cxx/cmpc-inl-sysfun.lsp index 045cb3de4..8c995570c 100644 --- a/src/cmp/cmpbackend-cxx/cmpc-inl-sysfun.lsp +++ b/src/cmp/cmpbackend-cxx/cmpc-inl-sysfun.lsp @@ -88,7 +88,7 @@ :arg-types arg-types :exact-return-type exact-return-type :multiple-values multiple-values - ;; :side-effects (not (si:get-sysprop name 'no-side-effects)) + ;; :side-effects (function-may-have-side-effects name) :one-liner one-liner :expansion expansion))) (push inline-info (gethash (list name safety) *inline-information*)))) diff --git a/src/cmp/cmpbackend-cxx/cmpc-mach.lsp b/src/cmp/cmpbackend-cxx/cmpc-mach.lsp index ad4794e15..c3bd1d3c1 100644 --- a/src/cmp/cmpbackend-cxx/cmpc-mach.lsp +++ b/src/cmp/cmpbackend-cxx/cmpc-mach.lsp @@ -102,9 +102,9 @@ (:float single-float "float" "ecl_make_single_float" "ecl_to_float" "ecl_single_float") (:double double-float "double" "ecl_make_double_float" "ecl_to_double" "ecl_double_float") (:long-double long-float "long double" "ecl_make_long_float" "ecl_to_long_double" "ecl_long_float") - (:csfloat si::complex-single-float "_Complex float" "ecl_make_csfloat" "ecl_to_csfloat" "ecl_csfloat") - (:cdfloat si::complex-double-float "_Complex double" "ecl_make_cdfloat" "ecl_to_cdfloat" "ecl_cdfloat") - (:clfloat si::complex-long-float "_Complex long double" "ecl_make_clfloat" "ecl_to_clfloat" "ecl_clfloat") + (:csfloat (complex single-float) "_Complex float" "ecl_make_csfloat" "ecl_to_csfloat" "ecl_csfloat") + (:cdfloat (complex double-float) "_Complex double" "ecl_make_cdfloat" "ecl_to_cdfloat" "ecl_cdfloat") + (:clfloat (complex long-float) "_Complex long double" "ecl_make_clfloat" "ecl_to_clfloat" "ecl_clfloat") (:unsigned-char base-char "unsigned char" "ECL_CODE_CHAR" "ecl_base_char_code" "ECL_CHAR_CODE") (:char base-char "char" "ECL_CODE_CHAR" "ecl_base_char_code" "ECL_CHAR_CODE") (:wchar character "ecl_character" "ECL_CODE_CHAR" "ecl_char_code" "ECL_CHAR_CODE") diff --git a/src/cmp/cmpbackend-cxx/cmpc-util.lsp b/src/cmp/cmpbackend-cxx/cmpc-util.lsp index 16780fc56..bc5c2cfb2 100644 --- a/src/cmp/cmpbackend-cxx/cmpc-util.lsp +++ b/src/cmp/cmpbackend-cxx/cmpc-util.lsp @@ -12,6 +12,14 @@ (defvar *emitted-functions* nil) (defvar *inline-information* nil) +(defconfig *c-compatible-variadic-dispatch* + #+c-compatible-variadic-dispatch t + #-c-compatible-variadic-dispatch nil) + +(defconfig *complex-float* + #+complex-float t + #-complex-float nil) + ;;; Compiled code uses the following kinds of variables: ;;; 1. Vi, declared explicitely, either unboxed or not (*lcl*, next-lcl) ;;; 2. Ti, declared collectively, of type object, may be reused (*temp*, next-temp) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp b/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp index cb8567f7b..6defe114a 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-cont.lsp @@ -91,15 +91,19 @@ (defun c2tagbody-body (body) ;;; INV: BODY is a list of tags and forms. We have processed the body ;;; so that the last element is always a form producing NIL. - (loop for (this-form next-form . rest) on body do + (loop for (this-form . rest) on body do (cond ((tag-p this-form) (wt-label (tag-jump this-form))) - ((tag-p next-form) - (with-exit-label (*exit* (tag-jump next-form)) - (let ((*destination* 'TRASH)) - (c2expr this-form)))) + ((endp rest) + ;; Last form, it is never a label! + (c2expr this-form)) (t - (c2expr this-form))))) + (let* ((next-form (first rest)) + (maybe-tag (when (tag-p next-form) + (tag-jump next-form)))) + (with-exit-label (*exit* maybe-tag) + (let ((*destination* 'TRASH)) + (c2expr this-form)))))))) (defun c2go (c1form tag nonlocal) (declare (ignore c1form)) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-data.lsp b/src/cmp/cmpbackend-cxx/cmppass2-data.lsp index f80d951a5..f90d47b17 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-data.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-data.lsp @@ -59,19 +59,18 @@ (defun data-c-dump (filename) (labels ((produce-strings () ;; Only Windows has a size limit in the strings it creates. - #-windows - (let ((s (data-dump-array))) - (when (plusp (length s)) - (list s))) - #+windows - (loop with string = (data-dump-array) - with max-string-size = 65530 - with l = (length string) - for i from 0 below l by max-string-size - for this-l = (min (- l i) max-string-size) - collect (make-array this-l :displaced-to string - :element-type (array-element-type string) - :displaced-index-offset i))) + (if (member :windows *features*) + (loop with string = (data-dump-array) + with max-string-size = 65530 + with l = (length string) + for i from 0 below l by max-string-size + for this-l = (min (- l i) max-string-size) + collect (make-array this-l :displaced-to string + :element-type (array-element-type string) + :displaced-index-offset i)) + (let ((s (data-dump-array))) + (when (plusp (length s)) + (list s))))) (output-one-c-string (name string stream) (let* ((*wt-string-size* 0) (*wt-data-column* 80) @@ -176,21 +175,18 @@ "ecl_def_ct_complex(~A,&~A_data,&~A_data,static,const);" name name-real name-imag))) -#+complex-float (defun static-csfloat-builder (name value stream) (let* ((*read-default-float-format* 'single-float) (*print-readably* t)) (format stream "ecl_def_ct_csfloat(~A,(~S + I*~S),static,const);" name (realpart value) (imagpart value) stream))) -#+complex-float (defun static-cdfloat-builder (name value stream) (let* ((*read-default-float-format* 'double-float) (*print-readably* t)) (format stream "ecl_def_ct_cdfloat(~A,(~S + I*~S),static,const);" name (realpart value) (imagpart value) stream))) -#+complex-float (defun static-clfloat-builder (name value stream) (let* ((*read-default-float-format* 'long-float) (*print-readably* t)) @@ -220,15 +216,16 @@ (long-float (and (not (ext:float-nan-p object)) (not (ext:float-infinity-p object)) #'static-long-float-builder)) - #+complex-float - (si:complex-single-float #'static-csfloat-builder) - #+complex-float - (si:complex-double-float #'static-cdfloat-builder) - #+complex-float - (si:complex-long-float #'static-clfloat-builder) - (complex (and (static-constant-expression (realpart object)) - (static-constant-expression (imagpart object)) - #'static-complex-builder)) + (complex + (when (and (static-constant-expression (realpart object)) + (static-constant-expression (imagpart object))) + (if *complex-float* + (typecase (realpart object) + (single-float #'static-csfloat-builder) + (double-float #'static-cdfloat-builder) + (long-float #'static-clfloat-builder) + (t #'static-complex-builder)) + #'static-complex-builder))) #+sse2 (ext:sse-pack #'static-sse-pack-builder) (t nil))) @@ -401,7 +398,8 @@ ((typep value 'character *cmp-env*) (wt-character value vv)) ((typep value 'float *cmp-env*) (wt-number value vv)) ((typep value '(complex float) *cmp-env*) (wt-number value vv)) - (t (baboon "wt-vv-value: ~s is not an immediate value, but has no VV index~%" value)))) + (t (baboon :format-control "wt-vv-value: ~s is not an immediate value, but has no VV index~%" + :format-arguments (list value))))) (defun wt-vv (vv-loc) (setf (vv-used-p vv-loc) t) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-loc.lsp b/src/cmp/cmpbackend-cxx/cmppass2-loc.lsp index 1787b6ba1..5406eaa98 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-loc.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-loc.lsp @@ -282,7 +282,7 @@ ((eq loc-host-type :object) ;; We relax the check a bit, because it is valid in C to coerce ;; between COMPLEX floats of different types. - (ensure-valid-object-type 'SI:COMPLEX-FLOAT) + (ensure-valid-object-type '(COMPLEX FLOAT)) (wt-from-object-conversion dest-type loc-type dest-host-type loc)) (t (coercion-error)))) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-top.lsp b/src/cmp/cmpbackend-cxx/cmppass2-top.lsp index fcfa99602..5e186955d 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-top.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-top.lsp @@ -358,10 +358,8 @@ (defun fun-c-compatible-variadic-signature (fun) ;; Returns true if we need to generate a signature of the form ;; `cl_object f(cl_narg narg, ...)` - #-c-compatible-variadic-dispatch - nil - #+c-compatible-variadic-dispatch - (and (fun-needs-narg fun) + (and *c-compatible-variadic-dispatch* + (fun-needs-narg fun) ;; local functions or lexical closures are never called via a ;; function pointer (not (eq (fun-closure fun) 'LEXICAL)) @@ -404,25 +402,24 @@ (t3function-header fun (fun-variadic-entrypoint-cfun fun) t - #+c-compatible-variadic-dispatch t)) + *c-compatible-variadic-dispatch*)) (wt-nl-open-brace) (wt-maybe-check-num-arguments t (fun-minarg fun) (fun-maxarg fun) (fun-name fun)) - #-c-compatible-variadic-dispatch - (wt-return (fun-required-lcls fun)) - #+c-compatible-variadic-dispatch - (let ((maxargs (min (fun-maxarg fun) (1+ si:c-arguments-limit)))) - (when (plusp maxargs) - (wt-nl "cl_object x[" maxargs "];") - (wt-nl "va_list args; va_start(args,narg);") - (loop for i below maxargs - do (wt-nl "x[" i "] = ") (wt-coerce-loc :object 'VA-ARG) (wt ";")) - (wt-nl "va_end(args);")) - (let ((args (loop for i below maxargs - collect (concatenate 'string "x[" (write-to-string i) "]")))) - (wt-return args))))) + (if (not *c-compatible-variadic-dispatch*) + (wt-return (fun-required-lcls fun)) + (let ((maxargs (min (fun-maxarg fun) (1+ si:c-arguments-limit)))) + (when (plusp maxargs) + (wt-nl "cl_object x[" maxargs "];") + (wt-nl "va_list args; va_start(args,narg);") + (loop for i below maxargs + do (wt-nl "x[" i "] = ") (wt-coerce-loc :object 'VA-ARG) (wt ";")) + (wt-nl "va_end(args);")) + (let ((args (loop for i below maxargs + collect (concatenate 'string "x[" (write-to-string i) "]")))) + (wt-return args)))))) (defun fun-fixed-narg-main-entrypoint (fun) "Number of fixed arguments for fun. If both variadic and ordinary @@ -430,8 +427,8 @@ entrypoints exist, return the number of fixed arguments for the variadic entrypoint. This may differ from the number of required parameters of the corresponding Lisp function if we are generating a C compatible variadic signature." - #+c-compatible-variadic-dispatch - (when (or (fun-variadic-entrypoint fun) (fun-c-compatible-variadic-signature fun)) + (when (and *c-compatible-variadic-dispatch* + (or (fun-variadic-entrypoint fun) (fun-c-compatible-variadic-signature fun))) (return-from fun-fixed-narg-main-entrypoint 0)) (min (fun-minarg fun) si:c-arguments-limit)) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-var.lsp b/src/cmp/cmpbackend-cxx/cmppass2-var.lsp index b27d9b359..3f84eab41 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-var.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-var.lsp @@ -32,9 +32,9 @@ (:float . "_ecl_float_loc") (:double . "_ecl_double_loc") (:long-double . "_ecl_long_double_loc") - #+complex-float (:csfloat . "_ecl_csfloat_loc") - #+complex-float (:cdfloat . "_ecl_cdfloat_loc") - #+complex-float (:clfloat . "_ecl_clfloat_loc") + (:csfloat . "_ecl_csfloat_loc") + (:cdfloat . "_ecl_cdfloat_loc") + (:clfloat . "_ecl_clfloat_loc") #+sse2 (:int-sse-pack . "_ecl_int_sse_pack_loc") #+sse2 (:float-sse-pack . "_ecl_float_sse_pack_loc") #+sse2 (:double-sse-pack . "_ecl_double_sse_pack_loc") diff --git a/src/cmp/cmpdefs.lsp b/src/cmp/cmpdefs.lsp index c3d873f8a..2b22eb94b 100644 --- a/src/cmp/cmpdefs.lsp +++ b/src/cmp/cmpdefs.lsp @@ -10,69 +10,82 @@ (in-package "COMPILER") +(defvar *config-options* '(*features*)) + +(defmacro defconfig (name value &optional docstring) + "Define a configuration option. Like DEFVAR, but records the variable +for cross-compilation." + `(progn + ,(if docstring + `(defvar ,name ,value ,docstring) + `(defvar ,name ,value)) + (pushnew ',name *config-options*))) + ;;; This is copied into each .h file generated, EXCEPT for system-p calls. ;;; The constant string *include-string* is the content of file "ecl.h". ;;; Here we use just a placeholder: it will be replaced with sed. -(defvar *cmpinclude* "") +(defconfig *cmpinclude* "") -(defvar *cc* "@ECL_CC@" -"This variable controls how the C compiler is invoked by ECL. +(defconfig *cc* "@ECL_CC@" + "This variable controls how the C compiler is invoked by ECL. The default value is \"cc -I. -I/usr/local/include/\". The second -I option names the directory where the file ECL.h has been installed. One can set the variable appropriately adding for instance flags which the C compiler may need to exploit special hardware features (e.g. a floating point coprocessor).") -(defvar *ld* "@ECL_CC@" -"This variable controls the linker which is used by ECL.") +(defconfig *ld* "@ECL_CC@" + "This variable controls the linker which is used by ECL.") -(defvar *ranlib* "@RANLIB@" +(defconfig *ranlib* "@RANLIB@" "Name of the `ranlib' program on the hosting platform.") -(defvar *ar* "@AR@" +(defconfig *ar* "@AR@" "Name of the `AR' program on the hosting platform.") -(defvar *cc-flags* "@CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@") +(defconfig *cc-flags* "@CPPFLAGS@ @CFLAGS@ @ECL_CFLAGS@") -(defvar *cc-optimize* #-msvc "-O2" - #+msvc "@CFLAGS_OPTIMIZE@") +(defconfig *cc-optimize* #-msvc "-O2" + #+msvc "@CFLAGS_OPTIMIZE@") -(defvar *ld-format* #-msvc "~A -o ~S -L~S ~{~S ~} ~@[~S~]~{ '~A'~} ~A" - #+msvc "~A -Fe~S~* ~{~S ~} ~@[~S~]~{ '~A'~} ~A") +(defconfig *ld-format* #-msvc "~A -o ~S -L~S ~{~S ~} ~@[~S~]~{ '~A'~} ~A" + #+msvc "~A -Fe~S~* ~{~S ~} ~@[~S~]~{ '~A'~} ~A") -(defvar *cc-format* (cond ((member :msvc *features*) - "~A -I. \"-I~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -o \"~A\"~{ '~A'~}") - ((member :nacl *features*) ;; pnacl-clang doesn't support -w - "~A -I. \"-I~A\" ~A ~:[~*~;~A~] -c \"~A\" -o \"~A\"~{ '~A'~}") - (t - "~A -I. \"-I~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -o \"~A\"~{ '~A'~}"))) +(defconfig *cc-format* (cond ((member :msvc *features*) + "~A -I. \"-I~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -o \"~A\"~{ '~A'~}") + ((member :nacl *features*) ;; pnacl-clang doesn't support -w + "~A -I. \"-I~A\" ~A ~:[~*~;~A~] -c \"~A\" -o \"~A\"~{ '~A'~}") + (t + "~A -I. \"-I~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -o \"~A\"~{ '~A'~}"))) -(defvar *ld-flags* "@LDFLAGS@") +(defconfig *ld-flags* "@LDFLAGS@") #-dlopen -(defvar *ld-libs* "-lecl @CORE_LIBS@ @FASL_LIBS@ @LIBS@") +(defconfig *ld-libs* "-lecl @CORE_LIBS@ @FASL_LIBS@ @LIBS@") #+dlopen -(defvar *ld-libs* #-msvc "-lecl @FASL_LIBS@ @LIBS@" - #+msvc "ecl.lib @CLIBS@") -#+dlopen -(defvar *ld-shared-flags* "@SHARED_LDFLAGS@ @LDFLAGS@") -#+dlopen -(defvar *ld-bundle-flags* "@BUNDLE_LDFLAGS@ @LDFLAGS@") -(defvar *ld-program-flags* "@PROGRAM_LDFLAGS@ @LDFLAGS@") +(defconfig *ld-libs* #-msvc "-lecl @FASL_LIBS@ @LIBS@" #+msvc "ecl.lib @CLIBS@") +(defconfig *ld-shared-flags* #+dlopen "@SHARED_LDFLAGS@ @LDFLAGS@" #-dlopen "") +(defconfig *ld-bundle-flags* #+dlopen "@BUNDLE_LDFLAGS@ @LDFLAGS@" #-dlopen "") +(defconfig *ld-program-flags* "@PROGRAM_LDFLAGS@ @LDFLAGS@") -(defvar +shared-library-prefix+ "@SHAREDPREFIX@") -(defvar +shared-library-extension+ "@SHAREDEXT@") -(defvar +shared-library-format+ "@SHAREDPREFIX@~a.@SHAREDEXT@") -(defvar +static-library-prefix+ "@LIBPREFIX@") -(defvar +static-library-extension+ "@LIBEXT@") -(defvar +static-library-format+ "@LIBPREFIX@~a.@LIBEXT@") -(defvar +object-file-extension+ "@OBJEXT@") -(defvar +executable-file-format+ "~a@EXEEXT@") +(defconfig +shared-library-prefix+ "@SHAREDPREFIX@") +(defconfig +shared-library-extension+ "@SHAREDEXT@") +(defconfig +shared-library-format+ "@SHAREDPREFIX@~a.@SHAREDEXT@") +(defconfig +static-library-prefix+ "@LIBPREFIX@") +(defconfig +static-library-extension+ "@LIBEXT@") +(defconfig +static-library-format+ "@LIBPREFIX@~a.@LIBEXT@") +(defconfig +object-file-extension+ "@OBJEXT@") +(defconfig +executable-file-format+ "~a@EXEEXT@") -(defvar *ecl-include-directory* "@includedir\@/") -(defvar *ecl-library-directory* "@libdir\@/") -(defvar *ecl-data-directory* "@ecldir\@/") +(defconfig *ecl-include-directory* "@includedir\@/") +(defconfig *ecl-library-directory* "@libdir\@/") +(defconfig *ecl-data-directory* "@ecldir\@/") -(defvar *ld-rpath* - (let ((x "@ECL_LDRPATH@")) - (and (plusp (length x)) - (format nil x *ecl-library-directory*)))) +(defconfig *ld-rpath* + (let ((x "@ECL_LDRPATH@")) + (and (plusp (length x)) + (format nil x *ecl-library-directory*)))) + +(defconfig *target-architecture* "@ARCHITECTURE@") +(defconfig *target-software-type* "@SOFTWARE_TYPE@") +(defconfig *target-lisp-implementation-version* "@PACKAGE_VERSION@") +(defconfig *target-identifier* "@TARGET_IDENTIFIER@") diff --git a/src/cmp/cmpenv-api.lsp b/src/cmp/cmpenv-api.lsp index b2addba0c..968b0c491 100644 --- a/src/cmp/cmpenv-api.lsp +++ b/src/cmp/cmpenv-api.lsp @@ -67,13 +67,15 @@ that are susceptible to be changed by PROCLAIM." (cmp-env-functions env)) env) -(defun cmp-env-register-symbol-macro (name form &optional (env *cmp-env*)) +(defun cmp-env-register-symbol-macro (name form &optional (env *cmp-env*) force) (cmp-env-register-symbol-macro-function name #'(lambda (whole env) (declare (ignore env whole)) form) - env)) + env + force)) -(defun cmp-env-register-symbol-macro-function (name function &optional (env *cmp-env*)) - (when (or (constant-variable-p name) (special-variable-p name)) +(defun cmp-env-register-symbol-macro-function (name function &optional (env *cmp-env*) force) + (when (and (not force) + (or (constant-variable-p name) (special-variable-p name))) (cmperr "Cannot bind the special or constant variable ~A with symbol-macrolet." name)) (push (list name 'si:symbol-macro function) (cmp-env-variables env)) @@ -104,6 +106,18 @@ that are susceptible to be changed by PROCLAIM." (setf env (cmp-env-register-type (car def) (cdr def) env))) env) +(defun register-all-known-types (&optional (env *cmp-env*)) + ;; Used during cross-compilation in compile.lsp.in to populate the + ;; lexical environment with type definitions + (do-all-symbols (type) + (ext:when-let ((deftype-form (si:get-sysprop type 'SI::DEFTYPE-FORM))) + (unless (cmp-env-search-type type env) + (let ((type-definition (eval (destructuring-bind (name lambda-list &rest body) + (rest deftype-form) + (si::expand-defmacro name lambda-list body 'DEFTYPE))))) + (setf env (cmp-env-register-type type type-definition env)))))) + env) + (defun cmp-env-search-function (name &optional (env *cmp-env*)) (let ((cfb nil) (unw nil) @@ -213,11 +227,11 @@ that are susceptible to be changed by PROCLAIM." return (cddr i) finally (return default))) -(defun cmp-env-search-type (name &optional (env *cmp-env*) (default name)) +(defun cmp-env-search-type (name &optional (env *cmp-env*)) (loop for i in (car env) when (and (consp i) (eq (first i) :type) (eq (second i) name)) return (third i) - finally (return default))) + finally (return nil))) diff --git a/src/cmp/cmpenv-declare.lsp b/src/cmp/cmpenv-declare.lsp index fb26a0fda..f8e4f8c70 100644 --- a/src/cmp/cmpenv-declare.lsp +++ b/src/cmp/cmpenv-declare.lsp @@ -22,7 +22,7 @@ (every test x)))) (defun type-name-p (name) - (or (cmp-env-search-type name *cmp-env* nil) + (or (cmp-env-search-type name *cmp-env*) (si:get-sysprop name 'SI::DEFTYPE-DEFINITION) (find-class name nil) (si:get-sysprop name 'SI::STRUCTURE-TYPE))) diff --git a/src/cmp/cmpenv-fun.lsp b/src/cmp/cmpenv-fun.lsp index 3fb421e49..27346ff7d 100644 --- a/src/cmp/cmpenv-fun.lsp +++ b/src/cmp/cmpenv-fun.lsp @@ -24,7 +24,7 @@ ;;; The valid return type declaration is: ;;; (( VALUES {type}* )) or ( {type}* ). -(defun proclaim-function (fname decl) +(defun proclaim-function (fname decl &optional destination) (if (si:valid-function-name-p fname) (let* ((arg-types '*) (return-types '*) @@ -43,12 +43,12 @@ (when (eq arg-types '()) (setf arg-types '(&optional))) (if (eq arg-types '*) - (si:rem-sysprop fname 'PROCLAIMED-ARG-TYPES) - (si:put-sysprop fname 'PROCLAIMED-ARG-TYPES arg-types)) + (rem-property fname 'PROCLAIMED-ARG-TYPES destination) + (put-property fname 'PROCLAIMED-ARG-TYPES arg-types destination)) (if (member return-types '(* (VALUES &rest t)) :test #'equalp) - (si:rem-sysprop fname 'PROCLAIMED-RETURN-TYPE) - (si:put-sysprop fname 'PROCLAIMED-RETURN-TYPE return-types))) + (rem-property fname 'PROCLAIMED-RETURN-TYPE destination) + (put-property fname 'PROCLAIMED-RETURN-TYPE return-types destination))) (warn "The function proclamation ~s ~s is not valid." fname decl))) (defun add-function-declaration (fname ftype &optional (env *cmp-env*)) @@ -68,7 +68,7 @@ (when may-be-global (let ((fun (cmp-env-search-function fname env))) (when (or (null fun) (and (fun-p fun) (fun-global fun))) - (si:get-sysprop fname 'PROCLAIMED-ARG-TYPES)))))) + (get-global-property fname 'PROCLAIMED-ARG-TYPES)))))) (defun get-return-type (fname &optional (env *cmp-env*)) (ext:if-let ((x (cmp-env-search-ftype fname env))) @@ -77,7 +77,7 @@ (values return-types t))) (let ((fun (cmp-env-search-function fname env))) (when (or (null fun) (and (fun-p fun) (fun-global fun))) - (si:get-sysprop fname 'PROCLAIMED-RETURN-TYPE))))) + (get-global-property fname 'PROCLAIMED-RETURN-TYPE))))) (defun get-local-arg-types (fun &optional (env *cmp-env*)) (ext:if-let ((x (cmp-env-search-ftype (fun-name fun) env))) diff --git a/src/cmp/cmpfun.lsp b/src/cmp/cmpfun.lsp index 72e6b05ad..cc560bf62 100644 --- a/src/cmp/cmpfun.lsp +++ b/src/cmp/cmpfun.lsp @@ -175,10 +175,3 @@ The function thus belongs to the type of functions that ecl_make_cfun accepts." (if (and (symbolp name) (setf cname (si:get-sysprop name 'Lfun))) (values cname t) (values (next-cfun "L~D~A" name) nil)))) - -(defun function-may-have-side-effects (fname) - (not (si:get-sysprop fname 'no-side-effects))) - -(defun function-may-change-sp (fname) - (not (or (si:get-sysprop fname 'no-side-effects) - (si:get-sysprop fname 'no-sp-change)))) diff --git a/src/cmp/cmpglobals.lsp b/src/cmp/cmpglobals.lsp index de1a0f49b..dee9c1696 100644 --- a/src/cmp/cmpglobals.lsp +++ b/src/cmp/cmpglobals.lsp @@ -66,7 +66,7 @@ running the compiler. It may be updated by running ") (defvar *functions* nil) ;;; --cmpc-machine.lsp, cmpffi.lsp --- -(defvar *machine* nil) +(defconfig *machine* nil) ;;; --cmpcall.lsp-- (defvar *compiler-declared-globals*) @@ -112,8 +112,8 @@ by the C compiler and they denote function and unwind-protect boundaries. Note that compared with the bytecodes compiler, these records contain an additional variable, block, tag or function object at the end.") -(defvar *cmp-env-root* - (cons nil (list (list '#:no-macro 'si:macro (constantly nil)))) +(defconfig *cmp-env-root* + (cons nil (list (list '#:no-macro 'si:macro 'si::constantly-nil))) "This is the common environment shared by all toplevel forms. It can only be altered by DECLAIM forms and it is used to initialize the value of *CMP-ENV*.") @@ -153,6 +153,11 @@ slashes before special characters.") (defvar *precompiled-header-flags* nil) (defvar *precompiled-header-cc-config* nil) +(defvar *cross-compiling* nil + "Are we cross compiling?") +(defvar *host-info* nil + "Information on the host configuration for cross compilation.") + ;;; ;;; Compiler program and flags. ;;; @@ -228,7 +233,7 @@ be deleted if they have been opened with LoadLibrary.") (*callbacks* nil) (*functions* nil) (*cmp-env-root* (copy-tree *cmp-env-root*)) - (*cmp-env* nil) + (*cmp-env* *cmp-env-root*) (*load-objects* (make-hash-table :size 128 :test #'equal)) (*make-forms* nil) (*referenced-objects* (make-array 256 :adjustable t :fill-pointer 0)) diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index 80f85616e..1e8c86195 100644 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -59,6 +59,7 @@ (load nil) (external-format :default) output-file + (target nil) &aux (*standard-output* *standard-output*) (*error-output* *error-output*) @@ -80,8 +81,13 @@ specifies whether to load the generated fasl file after compilation. The :O-FILE, :C-FILE, :H-FILE, and :DATA-FILE keyword parameters allow you to control the intermediate files generated by the ECL compiler.If the file was compiled successfully, returns the pathname of the compiled file." - #-dlopen - (unless system-p + (when target + (setf args (copy-list args)) + (remf args :target) + (return-from compile-file + (compile-with-target-info #'(lambda () (apply #'compile-file input-pathname args)) + target))) + (unless (or (member :dlopen *features*) system-p) (format t "~%;;;~ ~%;;; This system does not support loading dynamically linked libraries.~ ~%;;; Therefore, COMPILE-FILE without :SYSTEM-P T is unsupported.~ @@ -95,9 +101,12 @@ compiled successfully, returns the pathname of the compiled file." (setq *compile-file-pathname* (make-pathname :type ext :defaults input-pathname)) (when (probe-file *compile-file-pathname*) (return))))) - (when (and system-p load) + (when (and system-p load (not *cross-compiling*)) (error "Cannot load system files.")) - (cmpprogress "~&;;;~%;;; Compiling ~a." (namestring input-pathname)) + (cmpprogress "~&;;;~%;;; Compiling ~a~:[~; for target ~a~]." + (namestring input-pathname) + *cross-compiling* + *target-identifier*) (let* ((input-file (truename *compile-file-pathname*)) (*compile-file-truename* input-file) (*compiler-in-use* *compiler-in-use*) @@ -119,7 +128,9 @@ compiled successfully, returns the pathname of the compiled file." (cmpprogress "~&;;; Finished compiling ~a.~%;;;~%" (namestring input-pathname)) (cmperr "The C compiler failed to compile the intermediate file.")) (when load - (load true-output-file :verbose *compile-verbose*))) ; with-compiler-env + (if *cross-compiling* + (load input-file :verbose *compile-verbose*) + (load true-output-file :verbose *compile-verbose*)))) ; with-compiler-env (compiler-output-values true-output-file compiler-conditions))) (defun compiler-output-values (main-value conditions) @@ -170,6 +181,14 @@ after compilation." (unless (si:valid-function-name-p name) (error "~s is not a valid function name." name)) + (when *cross-compiling* + (return-from compile + (compile-with-target-info + (lambda () + (let ((*cross-compiling* nil)) + (compile name def))) + *host-info*))) + (cond ((and supplied-p def) (when (functionp def) (unless (function-lambda-expression def) @@ -202,7 +221,7 @@ after compilation." (*cmp-env-root* *cmp-env-root*)) (with-compiler-env (compiler-conditions) - (setf form (set-closure-env form lexenv *cmp-env-root*)) + (setf form (set-closure-env form lexenv *cmp-env*)) (compiler-pass1 form) (compiler-pass/propagate-types) (let (#+(or mingw32 msvc cygwin)(*self-destructing-fasl* t)) @@ -285,7 +304,7 @@ from the C language code. NIL means \"do not create the file\"." (*cmp-env-root* *cmp-env-root*)) (with-compiler-env (compiler-conditions) (with-cxx-env () - (setf disassembled-form (set-closure-env disassembled-form lexenv *cmp-env-root*)) + (setf disassembled-form (set-closure-env disassembled-form lexenv *cmp-env*)) (unwind-protect (progn (setf (symbol-function 'T3FUNCTION) @@ -334,9 +353,45 @@ from the C language code. NIL means \"do not create the file\"." (cmpprogress "~&;;; OPTIMIZE levels: Safety=~d, Space=~d, Speed=~d, Debug=~d~%;;;~%" *safety* *space* *speed* *debug*)) -(defmacro with-compilation-unit (options &rest body) - (declare (ignore options)) - `(progn ,@body)) +(defun compile-with-target-info (closure target-info) + (check-type target-info (or list pathname-designator)) + (when (typep target-info 'pathname-designator) + (setf target-info (read-target-info target-info))) + (let ((*host-info* (or *host-info* (get-target-info)))) + (progv (mapcar #'car target-info) (mapcar #'cdr target-info) + (unless (string= *target-lisp-implementation-version* (lisp-implementation-version)) + (error "Cannot cross compile as the target ECL version ~a does not match the host ECL version ~a" + *target-lisp-implementation-version* (lisp-implementation-version))) + (let* ((features-to-match '(#-unicode :unicode #-clos :clos)) + (missing-features (intersection features-to-match *features*))) + (unless (null missing-features) + (warn "Cross compiling to a target with ~{~#[~;~(~a~)~;~(~a~) and ~(~a~)~:;~@{~(~a~)~#[~; and ~:;, ~]~}~]~} support from a host ECL which doesn't include these features is unsupported. Please use a host with matching feature set." + missing-features))) + (multiple-value-prog1 (let ((*cross-compiling* t)) + (funcall closure)) + (let ((features (find '*features* target-info :key #'car))) + ;; Remember newly added keywords in *features* for future + ;; compilations + (setf (cdr features) *features*)))))) + +;;; This function is located in the si package because the bytecodes +;;; compiler will override it when calling +;;; (install-bytecodes-compiler) since it supports fewer options than +;;; the C compiler. +(defun si::do-compilation-unit (closure &key override target) + (cond (override + (let* ((*active-protection* nil)) + (si::do-compilation-unit closure :target target))) + ((null *active-protection*) + (let* ((*active-protection* t) + (*pending-actions* nil)) + (unwind-protect (si::do-compilation-unit closure :target target) + (loop for action in *pending-actions* + do (funcall action))))) + (target + (compile-with-target-info closure target)) + (t + (funcall closure)))) (ext:package-lock "CL" t) @@ -345,14 +400,16 @@ from the C language code. NIL means \"do not create the file\"." (let* ((compile #'compile) (disassemble #'disassemble) (compile-file #'compile-file) - (compile-file-pathname #'compile-file-pathname)) + (compile-file-pathname #'compile-file-pathname) + (do-compilation-unit #'si::do-compilation-unit)) (defun ext:install-c-compiler () (ext:package-lock (find-package :cl) nil) (setf *features* (delete :ecl-bytecmp *features*)) (setf (fdefinition 'disassemble) disassemble (fdefinition 'compile) compile (fdefinition 'compile-file) compile-file - (fdefinition 'compile-file-pathname) compile-file-pathname) + (fdefinition 'compile-file-pathname) compile-file-pathname + (fdefinition 'si::do-compilation-unit) do-compilation-unit) (ext:package-lock (find-package :cl) t))) (provide 'cmp) diff --git a/src/cmp/cmpopt-constant.lsp b/src/cmp/cmpopt-constant.lsp index d9fc87686..b8ee7f1ca 100644 --- a/src/cmp/cmpopt-constant.lsp +++ b/src/cmp/cmpopt-constant.lsp @@ -17,7 +17,7 @@ (and (consp form) (let ((head (car form))) (or (member head '(IF OR AND NULL NOT PROGN)) - (and (si:get-sysprop head 'pure) + (and (function-is-pure head) (inline-possible head)))) (loop for c in (rest form) always (constant-expression-p c env))))) diff --git a/src/cmp/cmpopt.lsp b/src/cmp/cmpopt.lsp index 76210ec57..d6c54dfb5 100644 --- a/src/cmp/cmpopt.lsp +++ b/src/cmp/cmpopt.lsp @@ -53,7 +53,7 @@ first rest function) ;; Type must be constant to optimize (if (constantp type env) - (setf type (cmp-env-search-type (ext:constant-form-value type env) env)) + (setf type (si::search-type-in-env (ext:constant-form-value type env) env)) (return-from expand-typep form)) (cond ;; compound function type specifier: signals an error ((contains-compound-function-type type) @@ -227,21 +227,6 @@ (single-float . (float x 0.0f0)) (double-float . (float x 0.0d0)) (long-float . (float x 0.0l0)) - #+complex-float - (si:complex-single-float . (let ((y x)) - (declare (:read-only y)) - (complex (float (realpart y) 0.0f0) - (float (imagpart y) 0.0f0)))) - #+complex-float - (si:complex-double-float . (let ((y x)) - (declare (:read-only y)) - (complex (float (realpart y) 0.0d0) - (float (imagpart y) 0.0d0)))) - #+complex-float - (si:complex-long-float . (let ((y x)) - (declare (:read-only y)) - (complex (float (realpart y) 0.0l0) - (float (imagpart y) 0.0l0)))) (complex . (let ((y x)) (declare (:read-only y)) (complex (realpart y) (imagpart y)))) @@ -261,7 +246,7 @@ first rest) ;; Type must be constant to optimize (if (constantp type env) - (setf type (cmp-env-search-type (ext:constant-form-value type env) env)) + (setf type (si::search-type-in-env (ext:constant-form-value type env) env)) (return-from expand-coerce form)) (cond ;; Trivial case ((subtypep 't type *cmp-env*) @@ -269,12 +254,23 @@ ;; ;; Detect inconsistencies in the type form. ((subtypep type 'nil *cmp-env*) - (cmperror "Cannot COERCE an expression to an empty type.")) + (cmperr "Cannot COERCE an expression to an empty type.")) ;; ;; No optimizations that take up too much space unless requested. ((not (policy-inline-type-checks)) form) ;; + ;; Complex floats + ((and *complex-float* (member type '(si:complex-single-float si:complex-double-float si:complex-long-float))) + (let ((prototype (case type + (si:complex-single-float 0.0f0) + (si:complex-double-float 0.0d0) + (si:complex-long-float 0.0l0)))) + `(let ((y ,value)) + (declare (:read-only y)) + (complex (float (realpart y) ,prototype) + (float (imagpart y) ,prototype))))) + ;; ;; Search for a simple template above, replacing X by the value. ((loop for (a-type . template) in +coercion-table+ when (eq type a-type) diff --git a/src/cmp/cmppackage.lsp b/src/cmp/cmppackage.lsp index 62ef2bc16..a4ccaaaaa 100644 --- a/src/cmp/cmppackage.lsp +++ b/src/cmp/cmppackage.lsp @@ -48,7 +48,10 @@ "COMPILER-MESSAGE-FORM" ;; Other operators. "INSTALL-C-COMPILER" - "UPDATE-COMPILER-FEATURES")) + "UPDATE-COMPILER-FEATURES" + ;; Target information for cross compilation. + "READ-TARGET-INFO" + "WRITE-TARGET-INFO")) diff --git a/src/cmp/cmppass1-call.lsp b/src/cmp/cmppass1-call.lsp index 06565e8c6..68fb3ed8b 100644 --- a/src/cmp/cmppass1-call.lsp +++ b/src/cmp/cmppass1-call.lsp @@ -251,7 +251,7 @@ :args (c1expr `(function ,fname)) forms fname :global))) (defun c1call-constant-fold (fname forms) - (when (and (si:get-sysprop fname 'pure) + (when (and (function-is-pure fname) (policy-evaluate-forms) (inline-possible fname)) (handler-case diff --git a/src/cmp/cmppass1-ffi.lsp b/src/cmp/cmppass1-ffi.lsp index 84be2eeef..166eb0863 100644 --- a/src/cmp/cmppass1-ffi.lsp +++ b/src/cmp/cmppass1-ffi.lsp @@ -97,6 +97,7 @@ ;;;; ;;;; CMPCBK -- Callbacks: lisp functions that can be called from the C world + (defconstant +foreign-elt-type-codes+ '( (:char . "ECL_FFI_CHAR") (:unsigned-char . "ECL_FFI_UNSIGNED_CHAR") @@ -122,9 +123,9 @@ (:float . "ECL_FFI_FLOAT") (:double . "ECL_FFI_DOUBLE") (:long-double . "ECL_FFI_LONG_DOUBLE") - #+complex-float (:csfloat . "ECL_FFI_CSFLOAT") - #+complex-float (:cdfloat . "ECL_FFI_CDFLOAT") - #+complex-float (:clfloat . "ECL_FFI_CLFLOAT") + (:csfloat . "ECL_FFI_CSFLOAT") + (:cdfloat . "ECL_FFI_CDFLOAT") + (:clfloat . "ECL_FFI_CLFLOAT") (:void . "ECL_FFI_VOID"))) (defun foreign-elt-type-code (type) diff --git a/src/cmp/cmppass1-special.lsp b/src/cmp/cmppass1-special.lsp index c50c41857..f8740c205 100644 --- a/src/cmp/cmppass1-special.lsp +++ b/src/cmp/cmppass1-special.lsp @@ -67,7 +67,7 @@ (make-c1form* 'FUNCTION :type 'FUNCTION :sp-change (not (and (symbolp fun) - (si:get-sysprop fun 'NO-SP-CHANGE))) + (function-no-sp-change fun))) :args fun))) ((and (consp fun) (member (car fun) '(LAMBDA EXT:LAMBDA-BLOCK))) (cmpck (endp (cdr fun)) diff --git a/src/cmp/cmppass1-top.lsp b/src/cmp/cmppass1-top.lsp index 51d5287ac..d8be410c4 100644 --- a/src/cmp/cmppass1-top.lsp +++ b/src/cmp/cmppass1-top.lsp @@ -11,9 +11,7 @@ (defun t1expr (form) (let* ((*current-toplevel-form* nil) - (*cmp-env* (if *cmp-env* - (cmp-env-copy *cmp-env*) - (cmp-env-root)))) + (*cmp-env* (cmp-env-copy *cmp-env*))) (push (t1expr* form) *top-level-forms*))) (defvar *toplevel-forms-to-print* diff --git a/src/cmp/cmptype.lsp b/src/cmp/cmptype.lsp index 5954a1f0a..966ff2a95 100644 --- a/src/cmp/cmptype.lsp +++ b/src/cmp/cmptype.lsp @@ -42,7 +42,7 @@ (long-float . 0.0L1) (double-float . 0.0D1) (single-float . 0.0F1) - ,@(when (member :complex-float *features*) + ,@(when *complex-float* '((si:complex-single-float . #c(0.0f0 0.0f0)) (si:complex-double-float . #c(0.0d0 0.0d0)) (si:complex-long-float . #c(0.0l0 0.0l0))))) diff --git a/src/cmp/cmputil.lsp b/src/cmp/cmputil.lsp index be7465493..20f81f3e6 100644 --- a/src/cmp/cmputil.lsp +++ b/src/cmp/cmputil.lsp @@ -43,22 +43,6 @@ (setf output f))) finally (return output)))) -(defun do-compilation-unit (closure &key override) - (cond (override - (let* ((*active-protection* nil)) - (do-compilation-unit closure))) - ((null *active-protection*) - (let* ((*active-protection* t) - (*pending-actions* nil)) - (unwind-protect (do-compilation-unit closure) - (loop for action in *pending-actions* - do (funcall action))))) - (t - (funcall closure)))) - -(defmacro with-compilation-unit ((&rest options) &body body) - `(do-compilation-unit #'(lambda () ,@body) ,@options)) - (defmacro with-compiler-env ((compiler-conditions) &body body) `(let ((*compiler-conditions* nil)) (declare (special *compiler-conditions*)) @@ -69,7 +53,7 @@ (compiler-error #'handle-compiler-error) (serious-condition #'handle-compiler-internal-error)) (mp:with-lock (mp:+load-compile-lock+) - (let ,+init-env-form+ + (let* ,+init-env-form+ (with-compilation-unit () ,@body)))) (abort ())) @@ -490,3 +474,28 @@ comparing circular objects." (list (null item)) (vector (zerop (length item))) (hash-table (zerop (hash-table-count item))))) + +(defun read-target-info (filename) + (unless (pathname-name filename) + (let* ((path1 (merge-pathnames "target-info.lsp" filename)) ; flat install + (path2 (merge-pathnames "*/*/target-info.lsp" filename)) ; file in lib/ecl-x.x.x/ + (files-found (nconc (directory path1) (directory path2)))) + (when (null files-found) + (cmperr "Can't find the target information for cross compilation at ~s or ~s." path1 path2)) + (setf filename (first files-found)))) + (with-open-file (s filename) + (with-standard-io-syntax + (read s)))) + +(defun get-target-info () + (mapcar #'(lambda (option) (cons option (symbol-value option))) + c::*config-options*)) + +(defun write-target-info (filename) + (with-open-file (s filename + :direction :output + :if-exists :supersede + :if-does-not-exist :create) + (with-standard-io-syntax + (let ((*print-circle* t)) + (format s "~S~%" (get-target-info)))))) diff --git a/src/cmp/load.lsp.in b/src/cmp/load.lsp.in index c91d8fa7b..c8f88282c 100644 --- a/src/cmp/load.lsp.in +++ b/src/cmp/load.lsp.in @@ -3,8 +3,8 @@ (defconstant +cmp-module-files+ '("src:cmp;cmppackage.lsp" - "src:cmp;cmpglobals.lsp" "build:cmp;cmpdefs.lsp" + "src:cmp;cmpglobals.lsp" "src:cmp;cmputil.lsp" "src:cmp;cmpcond.lsp" "src:cmp;cmptype-arith.lsp" diff --git a/src/cmp/proclamations.lsp b/src/cmp/proclamations.lsp index adf2d4696..4fd32fc66 100644 --- a/src/cmp/proclamations.lsp +++ b/src/cmp/proclamations.lsp @@ -44,24 +44,64 @@ (in-package "C") +(defun put-property (symbol property value collection) + (if collection + (setf (getf (gethash symbol collection) property) value) + (si:put-sysprop symbol property value))) + +(defun rem-property (symbol property collection) + (if collection + (remf (gethash symbol collection) property) + (si:rem-sysprop symbol property))) + +(let ((not-found (cons nil nil))) + (defun get-property (symbol property collection) + (if collection + (let ((value + (getf (gethash symbol collection) property not-found))) + (if (eq value not-found) + (values nil nil) + (values value t))) + (si:get-sysprop symbol property))) + + (defun get-global-property (symbol property) + (let ((value (getf (gethash symbol *static-proclamations*) + property not-found))) + (if (eq value not-found) + (si:get-sysprop symbol property) + (values value t))))) + +(defun function-is-pure (fname) + (get-property fname 'pure *static-proclamations*)) + +(defun function-may-have-side-effects (fname) + (not (get-property fname 'no-side-effects *static-proclamations*))) + +(defun function-may-change-sp (fname) + (not (or (get-property fname 'no-side-effects *static-proclamations*) + (get-property fname 'no-sp-change *static-proclamations*)))) + +(defun function-no-sp-change (fname) + (get-property fname 'no-sp-change *static-proclamations*)) + (defun parse-function-proclamation (name arg-types return-type &rest properties) - (when (si:get-sysprop name 'proclaimed-arg-types) + (when (get-property name 'proclaimed-arg-types *static-proclamations*) (warn "Duplicate proclamation for ~A" name)) - (proclaim-function - name (list arg-types return-type)) + (proclaim-function name (list arg-types return-type) *static-proclamations*) (loop for p in properties - do (case p - (:no-sp-change - (si:put-sysprop name 'no-sp-change t)) - ((:predicate :pure) - (si:put-sysprop name 'pure t) - (si:put-sysprop name 'no-side-effects t)) - ((:no-side-effects :reader) - (si:put-sysprop name 'no-side-effects t)) - (otherwise - (error "Unknown property ~S in function proclamation for ~S" - p name))))) + do (case p + (:no-sp-change + (put-property name 'no-sp-change t *static-proclamations*)) + ((:predicate :pure) + (put-property name 'pure t *static-proclamations*) + (put-property name 'no-side-effects t *static-proclamations*)) + ((:no-side-effects :reader) + (put-property name 'no-side-effects t *static-proclamations*)) + (otherwise + (error "Unknown property ~S in function proclamation for ~S" + p name))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; AUXILIARY TYPES @@ -1582,9 +1622,17 @@ (proclamation ext:non-negative-long-float-p (t) gen-bool :pure) (proclamation ext:non-positive-long-float-p (t) gen-bool :pure) (proclamation ext:positive-long-float-p (t) gen-bool :pure) +)) -))) ; eval-when - -(loop for i in '#.(mapcar #'rest +proclamations+) - do (apply #'parse-function-proclamation i)) +(defun collect-proclamations () + (let ((*static-proclamations* (make-hash-table :test 'equal :size 1024))) + (declare (special *static-proclamations*)) + (loop for i in (mapcar #'rest +proclamations+) + do (apply #'parse-function-proclamation i)) + *static-proclamations*)) +) ; eval-when +;;; The declarations from proclamations.lsp are collected in +;;; *STATIC-PROCLAMATIONS* instead of the main system properties to +;;; allow for switching them out for cross compilation. +(defconfig *static-proclamations* #.(collect-proclamations)) diff --git a/src/compile.lsp.in b/src/compile.lsp.in index f833ad1e8..402ee5c2b 100755 --- a/src/compile.lsp.in +++ b/src/compile.lsp.in @@ -18,7 +18,8 @@ (setq *features* '(@LSP_FEATURES@ @COMPILATION_FEATURES@)) (when (member :ecl-min *host-features*) (setq *features* (cons :ecl-min *features*))) - (when (member :uname *host-features*) + (when (and (member :uname *host-features*) + (not (member :windows *features*))) (setq *features* (cons :uname *features*))) (when (member :cross *host-features*) (setq *features* (cons :cross *features*)))) @@ -41,8 +42,9 @@ (progn (c::update-compiler-features :executable - #+(or windows cygwin mingw32) "build:ecl_min.exe" - #-(or windows cygwin mingw32) "build:@ECL_MIN@") + (if (intersection '(:windows :cygwin :mingw32) *host-features*) + "build:ecl_min.exe" + "build:@ECL_MIN@")) (format t "~&;;; System features: ~A~%" c::*compiler-features*)) ;;; @@ -76,6 +78,24 @@ (load "@true_srcdir@/doc/help.lsp") (si::dump-documentation "@true_builddir@/help.doc")) +;;; +;;; * Dump compiler configuration (for cross compilation) +;;; +#+cross +(let ((*features* '(:cross @LSP_FEATURES@))) + (setf c::*cmp-env-root* (c::register-all-known-types c::*cmp-env-root*)) + (setf c::*cmp-env-root* (c::cmp-env-add-declaration :feature + (cons :complex-float + (member :complex-float *features*)) + c::*cmp-env-root*)) + (dolist (s '(most-negative-fixnum most-positive-fixnum cl-fixnum-bits array-dimension-limit + array-total-size-limit ffi:c-short-min ffi:c-short-max ffi:c-ushort-max + ffi:c-int-min ffi:c-int-max ffi:c-uint-max ffi:c-long-min ffi:c-long-max + ffi:c-ulong-max #+long-long ffi:c-long-long-min #+long-long ffi:c-long-long-max + #+long-long ffi:c-ulong-long-max)) + (c::cmp-env-register-symbol-macro s (symbol-value s) c::*cmp-env-root* t)) + (c::write-target-info #P"build:target-info.lsp")) + ;;; ;;; * Trick to make names shorter in C files ;;; @@ -363,7 +383,7 @@ (write-line "id ICON \"ecl.ico\"" s)) (ext:copy-file #p"src:util;ecl.ico" "ecl.ico") #+msvc (ext:system "rc /nologo /r ecl.rc") - #-msvc (ext:system "windres ecl.rc -O coff ecl.res")) + #-msvc (ext:system "@WINDRES@ ecl.rc -O coff ecl.res")) (si::pathname-translations "SYS" '(("**;*.*.*" "@true_builddir@/**/*.*"))) diff --git a/src/configure b/src/configure index 57834b92b..7c4f04ca6 100755 --- a/src/configure +++ b/src/configure @@ -1,10 +1,10 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for ecl 24.5.10. +# Generated by GNU Autoconf 2.72 for ecl 24.5.10. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -16,7 +16,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -25,12 +24,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -102,7 +102,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -132,15 +132,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -148,12 +147,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -171,8 +171,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -186,14 +187,15 @@ test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -226,12 +228,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -253,7 +256,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -272,7 +275,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -311,14 +315,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -387,11 +383,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -405,21 +402,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -493,6 +483,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -541,7 +533,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -553,9 +544,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -580,10 +571,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -995,7 +990,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1208,7 +1203,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1224,7 +1219,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1254,8 +1249,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1263,7 +1258,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1313,7 +1308,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1381,7 +1376,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1409,7 +1404,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ecl 24.5.10 to adapt to many kinds of systems. +'configure' configures ecl 24.5.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1423,11 +1418,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1435,10 +1430,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1594,7 +1589,7 @@ Some influential environment variables: CPP C preprocessor XMKMF Path to xmkmf, Makefile generator for X Window System -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. @@ -1662,9 +1657,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ecl configure 24.5.10 -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1703,11 +1698,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1742,11 +1738,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1780,11 +1777,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -1822,11 +1820,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -1850,8 +1849,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -1859,10 +1858,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1882,15 +1883,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -1901,7 +1902,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -1920,11 +1921,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -1945,8 +1948,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -1976,12 +1979,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2020,12 +2025,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2045,8 +2051,8 @@ printf %s "checking for int$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ @@ -2087,12 +2093,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - case $ac_type in #( +else case e in #( + e) case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; +esac ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -2101,10 +2108,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : -else $as_nop - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2125,8 +2134,8 @@ printf %s "checking for uint$2_t... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ @@ -2158,10 +2167,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if eval test \"x\$"$3"\" = x"no" then : -else $as_nop - break +else case e in #( + e) break ;; +esac fi - done + done ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2183,8 +2194,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2208,12 +2219,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS - + ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2246,7 +2259,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ecl $as_me 24.5.10, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2492,10 +2505,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -2531,9 +2544,7 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2547,6 +2558,21 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -2574,16 +2600,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? +/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work. + #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); +extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -2633,7 +2662,6 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { - // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -2699,6 +2727,8 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; + // Work around memory leak warnings. + free (ia); // Check named initializers. struct named_init ni = { @@ -2720,7 +2750,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? +/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -3136,8 +3166,9 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac fi @@ -3165,12 +3196,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3179,18 +3210,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -3206,11 +3237,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -3239,8 +3270,9 @@ fi if test ${with_cross_config+y} then : withval=$with_cross_config; -else $as_nop - with_cross_config="`pwd`/cross_config" +else case e in #( + e) with_cross_config="`pwd`/cross_config" ;; +esac fi @@ -3248,8 +3280,9 @@ fi if test ${enable_shared+y} then : enableval=$enable_shared; -else $as_nop - enable_shared=yes +else case e in #( + e) enable_shared=yes ;; +esac fi @@ -3257,8 +3290,9 @@ fi if test ${enable_rpath+y} then : enableval=$enable_rpath; -else $as_nop - enable_rpath=yes +else case e in #( + e) enable_rpath=yes ;; +esac fi @@ -3266,8 +3300,9 @@ fi if test ${enable_threads+y} then : enableval=$enable_threads; -else $as_nop - enable_threads=auto +else case e in #( + e) enable_threads=auto ;; +esac fi @@ -3275,8 +3310,9 @@ fi if test ${enable_boehm+y} then : enableval=$enable_boehm; -else $as_nop - enable_boehm=auto +else case e in #( + e) enable_boehm=auto ;; +esac fi @@ -3284,8 +3320,9 @@ fi if test ${enable_libatomic+y} then : enableval=$enable_libatomic; -else $as_nop - enable_libatomic=auto +else case e in #( + e) enable_libatomic=auto ;; +esac fi @@ -3293,8 +3330,9 @@ fi if test ${enable_soname+y} then : enableval=$enable_soname; -else $as_nop - enable_soname=yes +else case e in #( + e) enable_soname=yes ;; +esac fi @@ -3302,8 +3340,9 @@ fi if test ${enable_gmp+y} then : enableval=$enable_gmp; -else $as_nop - enable_gmp=auto +else case e in #( + e) enable_gmp=auto ;; +esac fi @@ -3312,8 +3351,9 @@ fi if test ${with_C_gmp+y} then : withval=$with_C_gmp; with_c_gmp=yes; with_system_gmp=no -else $as_nop - with_c_gmp=no +else case e in #( + e) with_c_gmp=no ;; +esac fi @@ -3322,8 +3362,9 @@ fi if test ${with_system_gmp+y} then : withval=$with_system_gmp; -else $as_nop - with_system_gmp="auto" +else case e in #( + e) with_system_gmp="auto" ;; +esac fi @@ -3332,8 +3373,9 @@ fi if test ${with_gmp+y} then : withval=$with_gmp; -else $as_nop - with_gmp_args="" +else case e in #( + e) with_gmp_args="" ;; +esac fi @@ -3342,8 +3384,9 @@ fi if test ${with_gmp_args+y} then : withval=$with_gmp_args; -else $as_nop - with_gmp_args="" +else case e in #( + e) with_gmp_args="" ;; +esac fi @@ -3424,8 +3467,9 @@ fi if test ${with_cxx+y} then : withval=$with_cxx; -else $as_nop - with_cxx=no +else case e in #( + e) with_cxx=no ;; +esac fi @@ -3434,8 +3478,9 @@ fi if test ${with_tcp+y} then : withval=$with_tcp; -else $as_nop - with_tcp=yes +else case e in #( + e) with_tcp=yes ;; +esac fi @@ -3444,8 +3489,9 @@ fi if test ${with_serve_event+y} then : withval=$with_serve_event; -else $as_nop - with_serve_event=${enable_shared} +else case e in #( + e) with_serve_event=${enable_shared} ;; +esac fi @@ -3454,8 +3500,9 @@ fi if test ${with_clos_streams+y} then : withval=$with_clos_streams; -else $as_nop - with_clos_streams=yes +else case e in #( + e) with_clos_streams=yes ;; +esac fi @@ -3464,8 +3511,9 @@ fi if test ${with_cmuformat+y} then : withval=$with_cmuformat; -else $as_nop - with_cmuformat=${with_clos_streams} +else case e in #( + e) with_cmuformat=${with_clos_streams} ;; +esac fi @@ -3474,8 +3522,9 @@ fi if test ${with_asdf+y} then : withval=$with_asdf; -else $as_nop - with_asdf=yes +else case e in #( + e) with_asdf=yes ;; +esac fi @@ -3484,8 +3533,9 @@ fi if test ${with_defsystem+y} then : withval=$with_defsystem; -else $as_nop - with_defsystem=no +else case e in #( + e) with_defsystem=no ;; +esac fi @@ -3494,8 +3544,9 @@ fi if test ${with_cmp+y} then : withval=$with_cmp; -else $as_nop - with_cmp=yes +else case e in #( + e) with_cmp=yes ;; +esac fi @@ -3504,8 +3555,9 @@ fi if test ${with_bytecmp+y} then : withval=$with_bytecmp; -else $as_nop - with_bytecmp=yes +else case e in #( + e) with_bytecmp=yes ;; +esac fi @@ -3514,8 +3566,9 @@ fi if test ${with_rt+y} then : withval=$with_rt; -else $as_nop - with_rt=no +else case e in #( + e) with_rt=no ;; +esac fi @@ -3524,8 +3577,9 @@ fi if test ${with_profile+y} then : withval=$with_profile; -else $as_nop - with_profile=no +else case e in #( + e) with_profile=no ;; +esac fi @@ -3534,8 +3588,9 @@ fi if test ${with_dffi+y} then : withval=$with_dffi; enable_libffi=${withval} -else $as_nop - enable_libffi=auto +else case e in #( + e) enable_libffi=auto ;; +esac fi @@ -3544,8 +3599,9 @@ fi if test ${with_fpe+y} then : withval=$with_fpe; -else $as_nop - with_fpe=yes +else case e in #( + e) with_fpe=yes ;; +esac fi @@ -3554,8 +3610,9 @@ fi if test ${with_signed_zero+y} then : withval=$with_signed_zero; -else $as_nop - with_signed_zero="yes" +else case e in #( + e) with_signed_zero="yes" ;; +esac fi @@ -3564,8 +3621,9 @@ fi if test ${with_ieee_fp+y} then : withval=$with_ieee_fp; -else $as_nop - with_ieee_fp="yes" +else case e in #( + e) with_ieee_fp="yes" ;; +esac fi @@ -3574,8 +3632,9 @@ fi if test ${with_sse+y} then : withval=$with_sse; -else $as_nop - with_sse="no" +else case e in #( + e) with_sse="no" ;; +esac fi @@ -3583,8 +3642,9 @@ fi if test ${enable_unicode+y} then : enableval=$enable_unicode; -else $as_nop - enable_unicode=32 +else case e in #( + e) enable_unicode=32 ;; +esac fi @@ -3592,8 +3652,9 @@ fi if test ${enable_c99complex+y} then : enableval=$enable_c99complex; enable_c99complex=${enableval} -else $as_nop - enable_c99complex=auto +else case e in #( + e) enable_c99complex=auto ;; +esac fi @@ -3601,8 +3662,9 @@ fi if test ${enable_smallcons+y} then : enableval=$enable_smallcons; enable_smallcons=${enableval} -else $as_nop - enable_smallcons=yes +else case e in #( + e) enable_smallcons=yes ;; +esac fi @@ -3610,8 +3672,9 @@ fi if test ${enable_gengc+y} then : enableval=$enable_gengc; enable_gengc=${enableval} -else $as_nop - enable_gengc=no +else case e in #( + e) enable_gengc=no ;; +esac fi @@ -3619,8 +3682,9 @@ fi if test ${enable_precisegc+y} then : enableval=$enable_precisegc; enable_precisegc=${enableval} -else $as_nop - enable_precisegc=no +else case e in #( + e) enable_precisegc=no ;; +esac fi @@ -3628,8 +3692,9 @@ fi if test ${enable_serialization+y} then : enableval=$enable_serialization; -else $as_nop - enable_serialization=no +else case e in #( + e) enable_serialization=no ;; +esac fi @@ -3645,8 +3710,9 @@ fi if test ${with_debug_cflags+y} then : withval=$with_debug_cflags; -else $as_nop - with_debug_cflags="no" +else case e in #( + e) with_debug_cflags="no" ;; +esac fi @@ -3655,8 +3721,9 @@ fi if test ${with_profile_cflags+y} then : withval=$with_profile_cflags; -else $as_nop - with_profile_cflags="no" +else case e in #( + e) with_profile_cflags="no" ;; +esac fi @@ -3665,8 +3732,9 @@ fi if test ${with_extra_files+y} then : withval=$with_extra_files; with_extra_files="${withval}" -else $as_nop - with_extra_files="" +else case e in #( + e) with_extra_files="" ;; +esac fi @@ -3675,8 +3743,9 @@ fi if test ${with_init_form+y} then : withval=$with_init_form; with_init_form="${withval}" -else $as_nop - with_init_form="" +else case e in #( + e) with_init_form="" ;; +esac fi @@ -3684,8 +3753,9 @@ fi if test ${enable_manual+y} then : enableval=$enable_manual; enable_manual=${enableval} -else $as_nop - enable_manual=auto +else case e in #( + e) enable_manual=auto ;; +esac fi @@ -3714,15 +3784,16 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias +else case e in #( + e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -3749,14 +3820,15 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then +else case e in #( + e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -3802,8 +3874,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3825,7 +3897,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3847,8 +3920,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3870,7 +3943,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3905,8 +3979,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3928,7 +4002,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3950,8 +4025,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -3990,7 +4065,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4014,8 +4090,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4037,7 +4113,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4063,8 +4140,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4086,7 +4163,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4124,8 +4202,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4147,7 +4225,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4169,8 +4248,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4192,7 +4271,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4221,10 +4301,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4296,8 +4376,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. +# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -4317,7 +4397,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' + # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -4328,8 +4408,9 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop - ac_file='' +else case e in #( + e) ac_file='' ;; +esac fi if test -z "$ac_file" then : @@ -4338,13 +4419,14 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -4368,10 +4450,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. + # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) +# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will +# work properly (i.e., refer to 'conftest.exe'), while it won't with +# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -4381,11 +4463,12 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4401,6 +4484,8 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -4440,26 +4525,27 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use '--host'. +See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4491,16 +4577,18 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -4511,8 +4599,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4529,12 +4617,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -4552,8 +4642,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -4571,8 +4661,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4587,8 +4677,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4605,12 +4695,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -4637,8 +4730,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4655,25 +4748,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4683,8 +4779,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4701,25 +4797,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4729,8 +4828,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4747,25 +4846,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -4802,8 +4904,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CXX"; then +else case e in #( + e) if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4825,7 +4927,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then @@ -4851,8 +4954,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CXX"; then +else case e in #( + e) if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4874,7 +4977,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then @@ -4934,8 +5038,8 @@ printf %s "checking whether the compiler supports GNU C++... " >&6; } if test ${ac_cv_cxx_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4952,12 +5056,14 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } @@ -4975,8 +5081,8 @@ printf %s "checking whether $CXX accepts -g... " >&6; } if test ${ac_cv_prog_cxx_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_cxx_werror_flag=$ac_cxx_werror_flag +else case e in #( + e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" @@ -4994,8 +5100,8 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes -else $as_nop - CXXFLAGS="" +else case e in #( + e) CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5010,8 +5116,8 @@ _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : -else $as_nop - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else case e in #( + e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5028,12 +5134,15 @@ if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag + ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } @@ -5060,8 +5169,8 @@ printf %s "checking for $CXX option to enable C++11 features... " >&6; } if test ${ac_cv_prog_cxx_cxx11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_cxx11=no +else case e in #( + e) ac_cv_prog_cxx_cxx11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5078,25 +5187,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx11" != "xno" && break done rm -f conftest.$ac_ext -CXX=$ac_save_CXX +CXX=$ac_save_CXX ;; +esac fi if test "x$ac_cv_prog_cxx_cxx11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx11" = x +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx11" + CXX="$CXX $ac_cv_prog_cxx_cxx11" ;; +esac fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_prog_cxx_stdcxx=cxx11 + ac_prog_cxx_stdcxx=cxx11 ;; +esac fi fi if test x$ac_prog_cxx_stdcxx = xno @@ -5106,8 +5218,8 @@ printf %s "checking for $CXX option to enable C++98 features... " >&6; } if test ${ac_cv_prog_cxx_cxx98+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_cxx98=no +else case e in #( + e) ac_cv_prog_cxx_cxx98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5124,25 +5236,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx98" != "xno" && break done rm -f conftest.$ac_ext -CXX=$ac_save_CXX +CXX=$ac_save_CXX ;; +esac fi if test "x$ac_cv_prog_cxx_cxx98" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx98" = x +else case e in #( + e) if test "x$ac_cv_prog_cxx_cxx98" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx98" + CXX="$CXX $ac_cv_prog_cxx_cxx98" ;; +esac fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 - ac_prog_cxx_stdcxx=cxx98 + ac_prog_cxx_stdcxx=cxx98 ;; +esac fi fi @@ -5167,8 +5282,8 @@ if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded +else case e in #( + e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -5186,9 +5301,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5202,15 +5318,16 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -5219,7 +5336,8 @@ fi done ac_cv_prog_CPP=$CPP - + ;; +esac fi CPP=$ac_cv_prog_CPP else @@ -5242,9 +5360,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5258,24 +5377,26 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -5292,8 +5413,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$RANLIB"; then +else case e in #( + e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5315,7 +5436,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then @@ -5337,8 +5459,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RANLIB"; then +else case e in #( + e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5360,7 +5482,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then @@ -5407,8 +5530,8 @@ if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -5462,7 +5585,8 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - + ;; +esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install @@ -5503,8 +5627,8 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 -else $as_nop - cat >conftest.make <<\_ACEOF +else case e in #( + e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -5516,7 +5640,8 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make +rm -f conftest.make ;; +esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -5536,8 +5661,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$RANLIB"; then +else case e in #( + e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5559,7 +5684,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then @@ -5581,8 +5707,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_RANLIB"; then +else case e in #( + e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5604,7 +5730,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then @@ -5638,8 +5765,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then +else case e in #( + e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5661,7 +5788,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then @@ -5683,8 +5811,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then +else case e in #( + e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5706,7 +5834,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then @@ -5741,8 +5870,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CTAGS+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CTAGS"; then +else case e in #( + e) if test -n "$CTAGS"; then ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5764,7 +5893,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CTAGS=$ac_cv_prog_CTAGS if test -n "$CTAGS"; then @@ -5788,8 +5918,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ETAGS+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ETAGS"; then +else case e in #( + e) if test -n "$ETAGS"; then ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5811,7 +5941,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ETAGS=$ac_cv_prog_ETAGS if test -n "$ETAGS"; then @@ -6187,6 +6318,111 @@ LSP_FEATURES="${LSP_FEATURES} :windows" LSP_FEATURES="${LSP_FEATURES} :win64" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_WINDRES+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_WINDRES="${ac_tool_prefix}windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +printf "%s\n" "$WINDRES" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_WINDRES+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_WINDRES="windres" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +printf "%s\n" "$ac_ct_WINDRES" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + # set variable WINDRES to appropriate `windres' program + ;; darwin*) thehost='darwin' @@ -6377,6 +6613,7 @@ printf "%s\n" "${clibs}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for architecture" >&5 printf %s "checking for architecture... " >&6; } ARCHITECTURE=`echo "${host_cpu}" | tr a-z A-Z` # i386 -> I386 +TARGET_IDENTIFIER="${host}" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ARCHITECTURE}" >&5 printf "%s\n" "${ARCHITECTURE}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for software type" >&5 @@ -6397,8 +6634,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_INSTALL_INFO+y} then : printf %s "(cached) " >&6 -else $as_nop - case $INSTALL_INFO in +else case e in #( + e) case $INSTALL_INFO in [\\/]* | ?:[\\/]*) ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. ;; @@ -6423,6 +6660,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi INSTALL_INFO=$ac_cv_path_INSTALL_INFO @@ -6455,8 +6693,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MAKEINFO+y} then : printf %s "(cached) " >&6 -else $as_nop - case $MAKEINFO in +else case e in #( + e) case $MAKEINFO in [\\/]* | ?:[\\/]*) ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. ;; @@ -6481,6 +6719,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi MAKEINFO=$ac_cv_path_MAKEINFO @@ -6563,16 +6802,22 @@ printf %s "checking for __gmpz_init in -lgmp... " >&6; } if test ${ac_cv_lib_gmp___gmpz_init+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char __gmpz_init (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char __gmpz_init (void); int main (void) { @@ -6584,20 +6829,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gmp___gmpz_init=yes -else $as_nop - ac_cv_lib_gmp___gmpz_init=no +else case e in #( + e) ac_cv_lib_gmp___gmpz_init=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 printf "%s\n" "$ac_cv_lib_gmp___gmpz_init" >&6; } if test "x$ac_cv_lib_gmp___gmpz_init" = xyes then : with_system_gmp=yes -else $as_nop - with_system_gmp=no +else case e in #( + e) with_system_gmp=no ;; +esac fi ;; esac @@ -6609,16 +6857,22 @@ printf %s "checking for __gmpz_init in -lgmp... " >&6; } if test ${ac_cv_lib_gmp___gmpz_init+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char __gmpz_init (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char __gmpz_init (void); int main (void) { @@ -6630,20 +6884,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gmp___gmpz_init=yes -else $as_nop - ac_cv_lib_gmp___gmpz_init=no +else case e in #( + e) ac_cv_lib_gmp___gmpz_init=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 printf "%s\n" "$ac_cv_lib_gmp___gmpz_init" >&6; } if test "x$ac_cv_lib_gmp___gmpz_init" = xyes then : FASL_LIBS="${FASL_LIBS} -lgmp" -else $as_nop - as_fn_error $? "System gmp library requested but not found." "$LINENO" 5 +else case e in #( + e) as_fn_error $? "System gmp library requested but not found." "$LINENO" 5 ;; +esac fi ac_header= ac_cache= @@ -6806,16 +7063,22 @@ printf %s "checking for getpwnam in -lsun... " >&6; } if test ${ac_cv_lib_sun_getpwnam+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsun $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char getpwnam (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char getpwnam (void); int main (void) { @@ -6827,12 +7090,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sun_getpwnam=yes -else $as_nop - ac_cv_lib_sun_getpwnam=no +else case e in #( + e) ac_cv_lib_sun_getpwnam=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5 printf "%s\n" "$ac_cv_lib_sun_getpwnam" >&6; } @@ -6849,15 +7114,21 @@ printf %s "checking for library containing strerror... " >&6; } if test ${ac_cv_search_strerror+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char strerror (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char strerror (void); int main (void) { @@ -6888,11 +7159,13 @@ done if test ${ac_cv_search_strerror+y} then : -else $as_nop - ac_cv_search_strerror=no +else case e in #( + e) ac_cv_search_strerror=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 printf "%s\n" "$ac_cv_search_strerror" >&6; } @@ -7019,16 +7292,22 @@ printf %s "checking for GC_malloc in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_malloc+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_malloc (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_malloc (void); int main (void) { @@ -7040,12 +7319,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_malloc=yes -else $as_nop - ac_cv_lib_gc_GC_malloc=no +else case e in #( + e) ac_cv_lib_gc_GC_malloc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_malloc" >&6; } @@ -7055,8 +7336,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi else @@ -7065,16 +7347,22 @@ printf %s "checking for GC_get_thr_restart_signal in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_get_thr_restart_signal+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_get_thr_restart_signal (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_get_thr_restart_signal (void); int main (void) { @@ -7086,12 +7374,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_get_thr_restart_signal=yes -else $as_nop - ac_cv_lib_gc_GC_get_thr_restart_signal=no +else case e in #( + e) ac_cv_lib_gc_GC_get_thr_restart_signal=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_get_thr_restart_signal" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_get_thr_restart_signal" >&6; } @@ -7101,8 +7391,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GC_register_my_thread in -lgc" >&5 @@ -7110,16 +7401,22 @@ printf %s "checking for GC_register_my_thread in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_register_my_thread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_register_my_thread (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_register_my_thread (void); int main (void) { @@ -7131,12 +7428,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_register_my_thread=yes -else $as_nop - ac_cv_lib_gc_GC_register_my_thread=no +else case e in #( + e) ac_cv_lib_gc_GC_register_my_thread=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_register_my_thread" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_register_my_thread" >&6; } @@ -7146,8 +7445,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GC_set_start_callback in -lgc" >&5 @@ -7155,16 +7455,22 @@ printf %s "checking for GC_set_start_callback in -lgc... " >&6; } if test ${ac_cv_lib_gc_GC_set_start_callback+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char GC_set_start_callback (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char GC_set_start_callback (void); int main (void) { @@ -7176,12 +7482,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gc_GC_set_start_callback=yes -else $as_nop - ac_cv_lib_gc_GC_set_start_callback=no +else case e in #( + e) ac_cv_lib_gc_GC_set_start_callback=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_set_start_callback" >&5 printf "%s\n" "$ac_cv_lib_gc_GC_set_start_callback" >&6; } @@ -7191,8 +7499,9 @@ then : LIBS="-lgc $LIBS" -else $as_nop - system_boehm="no" +else case e in #( + e) system_boehm="no" ;; +esac fi fi @@ -7201,8 +7510,9 @@ fi if test "x$ac_cv_header_gc_gc_h" = xyes then : ECL_BOEHM_GC_HEADER='gc/gc.h' -else $as_nop - system_boehm=no +else case e in #( + e) system_boehm=no ;; +esac fi fi @@ -7312,16 +7622,22 @@ printf %s "checking for ffi_closure_alloc in -lffi... " >&6; } if test ${ac_cv_lib_ffi_ffi_closure_alloc+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lffi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char ffi_closure_alloc (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char ffi_closure_alloc (void); int main (void) { @@ -7333,20 +7649,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ffi_ffi_closure_alloc=yes -else $as_nop - ac_cv_lib_ffi_ffi_closure_alloc=no +else case e in #( + e) ac_cv_lib_ffi_ffi_closure_alloc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_closure_alloc" >&5 printf "%s\n" "$ac_cv_lib_ffi_ffi_closure_alloc" >&6; } if test "x$ac_cv_lib_ffi_ffi_closure_alloc" = xyes then : system_libffi=yes -else $as_nop - system_libffi=no +else case e in #( + e) system_libffi=no ;; +esac fi if test "${system_libffi}" = yes; then @@ -7361,8 +7680,9 @@ fi if test "x$ac_cv_header_ffi_h" = xyes then : ECL_LIBFFI_HEADER='ffi.h' -else $as_nop - system_libffi=no +else case e in #( + e) system_libffi=no ;; +esac fi fi @@ -7487,7 +7807,7 @@ then : withval=$with_x; fi -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +# $have_x is 'yes', 'no', 'disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled @@ -7497,8 +7817,8 @@ else *,NONE | NONE,*) if test ${ac_cv_have_x+y} then : printf %s "(cached) " >&6 -else $as_nop - # One or both of the vars are not set, and there is no cached value. +else case e in #( + e) # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no # Do we need to do anything special at all? @@ -7621,13 +7941,14 @@ if ac_fn_c_try_cpp "$LINENO" then : # We can compile using X headers with no special include directory. ac_x_includes= -else $as_nop - for ac_dir in $ac_x_header_dirs; do +else case e in #( + e) for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi -done +done ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no @@ -7654,8 +7975,8 @@ then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= -else $as_nop - LIBS=$ac_save_LIBS +else case e in #( + e) LIBS=$ac_save_LIBS for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! @@ -7665,7 +7986,8 @@ do break 2 fi done -done +done ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -7682,6 +8004,7 @@ case $ac_x_includes,$ac_x_libraries in #( ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" ;; +esac ;; esac fi ;; #( @@ -7708,14 +8031,14 @@ fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> @@ -7732,10 +8055,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" -else $as_nop - eval "$as_ac_Header=no" +else case e in #( + e) eval "$as_ac_Header=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -7743,7 +8068,7 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -7757,15 +8082,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -7796,11 +8127,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -7817,15 +8150,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -7856,11 +8195,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -7882,25 +8223,25 @@ printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -printf %s "checking for stdbool.h that conforms to C99... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99 or later" >&5 +printf %s "checking for stdbool.h that conforms to C99 or later... " >&6; } if test ${ac_cv_header_stdbool_h+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef __bool_true_false_are_defined - #error "__bool_true_false_are_defined is not defined" - #endif - char a[__bool_true_false_are_defined == 1 ? 1 : -1]; + /* "true" and "false" should be usable in #if expressions and + integer constant expressions, and "bool" should be a valid + type name. - /* Regardless of whether this is C++ or "_Bool" is a - valid type name, "true" and "false" should be usable - in #if expressions and integer constant expressions, - and "bool" should be a valid type name. */ + Although C99 requires bool, true, and false to be macros, + C23 and C++11 overrule that, so do not test for that. + Although C99 requires __bool_true_false_are_defined and + _Bool, C23 says they are obsolescent, so do not require + them. */ #if !true #error "'true' is not true" @@ -7934,43 +8275,12 @@ else $as_nop char n[sizeof m == h * sizeof m[0] ? 1 : -1]; char o[-1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html */ bool p = true; bool *pp = &p; - /* C 1999 specifies that bool, true, and false are to be - macros, but C++ 2011 and later overrule this. */ - #if __cplusplus < 201103 - #ifndef bool - #error "bool is not defined" - #endif - #ifndef false - #error "false is not defined" - #endif - #ifndef true - #error "true is not defined" - #endif - #endif - - /* If _Bool is available, repeat with it all the tests - above that used bool. */ - #ifdef HAVE__BOOL - struct sB { _Bool s: 1; _Bool t; } t; - - char q[(_Bool) 0.5 == true ? 1 : -1]; - char r[(_Bool) 0.0 == false ? 1 : -1]; - char u[sizeof (_Bool) > 0 ? 1 : -1]; - char v[sizeof t.t > 0 ? 1 : -1]; - - _Bool w[h]; - char x[sizeof m == h * sizeof m[0] ? 1 : -1]; - char y[-1 - (_Bool) 0 < 0 ? 1 : -1]; - _Bool z = true; - _Bool *pz = &p; - #endif - int main (void) { @@ -7979,20 +8289,10 @@ main (void) *pp |= p; *pp |= ! p; - #ifdef HAVE__BOOL - _Bool pt = &t; - *pz |= z; - *pz |= ! z; - #endif - /* Refer to every declared value, so they cannot be discarded as unused. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k - + !l + !m + !n + !o + !p + !pp + !ps - #ifdef HAVE__BOOL - + !q + !r + !u + !v + !w + !x + !y + !z + !pt - #endif - ); + return (!b + !c + !d + !e + !f + !g + !h + !i + !j + !k + + !l + !m + !n + !o + !p + !pp + !ps); ; return 0; @@ -8001,10 +8301,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_stdbool_h=yes -else $as_nop - ac_cv_header_stdbool_h=no +else case e in #( + e) ac_cv_header_stdbool_h=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } @@ -8020,8 +8322,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then +else case e in #( + e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -8040,9 +8342,10 @@ do as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in +case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -8077,7 +8380,8 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } @@ -8092,8 +8396,8 @@ printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +else case e in #( + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -8115,9 +8419,10 @@ do as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in +case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -8153,12 +8458,15 @@ else ac_cv_path_EGREP=$EGREP fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$EGREP @@ -8332,8 +8640,8 @@ printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8397,10 +8705,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes -else $as_nop - ac_cv_c_const=no +else case e in #( + e) ac_cv_c_const=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } @@ -8414,8 +8724,8 @@ printf %s "checking for inline... " >&6; } if test ${ac_cv_c_inline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_inline=no +else case e in #( + e) ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8433,7 +8743,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 printf "%s\n" "$ac_cv_c_inline" >&6; } @@ -8457,18 +8768,19 @@ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8486,10 +8798,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_tm=time.h -else $as_nop - ac_cv_struct_tm=sys/time.h +else case e in #( + e) ac_cv_struct_tm=sys/time.h ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } @@ -8504,8 +8818,8 @@ printf %s "checking for working volatile... " >&6; } if test ${ac_cv_c_volatile+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8522,10 +8836,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_volatile=yes -else $as_nop - ac_cv_c_volatile=no +else case e in #( + e) ac_cv_c_volatile=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 printf "%s\n" "$ac_cv_c_volatile" >&6; } @@ -8569,8 +8885,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_long_long=yes -else $as_nop - ac_cv_c_long_long=no +else case e in #( + e) ac_cv_c_long_long=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -8579,12 +8896,12 @@ if test $ac_cv_c_long_long = yes; then if test "x$ECL_LONG_LONG_BITS" = "x"; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8607,7 +8924,8 @@ then : eval "`cat conftestval`" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -8640,8 +8958,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_bigendian=unknown +else case e in #( + e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8687,8 +9005,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext int main (void) { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif @@ -8719,8 +9037,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -8764,8 +9083,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -8792,22 +9112,23 @@ unsigned short int ascii_mm[] = int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } - extern int foo; - -int -main (void) -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} + int + main (int argc, char **argv) + { + /* Intimidate the compiler so that it does not + optimize the arrays away. */ + char *p = argv[0]; + ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; + ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; + return use_ascii (argc) == use_ebcdic (*p); + } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -8816,9 +9137,10 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -8841,14 +9163,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no -else $as_nop - ac_cv_c_bigendian=yes +else case e in #( + e) ac_cv_c_bigendian=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } @@ -8886,12 +9211,12 @@ printf %s "checking appropriate type for fixnums... " >&6; } if test -z "${CL_FIXNUM_TYPE}" ; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8901,21 +9226,7 @@ int main() { int bits; FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - if (sizeof(int) >= sizeof(void*)) { - unsigned int t = 1; - signed int l = 0; - int_type="int"; - for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1); - l = (~l) << (bits - 3); -#if 1 - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-(l+1)); -#else - l++; - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-l); -#endif - } else if (sizeof(long) >= sizeof(void*)) { + if (sizeof(long) >= sizeof(void*)) { unsigned long int t = 1; signed long int l = 0; int_type="long int"; @@ -8979,7 +9290,8 @@ then : eval "`cat conftestval`" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -9172,12 +9484,12 @@ printf %s "checking character sequence for end of line... " >&6; } if test -z "${ECL_NEWLINE}" ; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9217,7 +9529,8 @@ then : ECL_NEWLINE=`cat conftestval` fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -9242,8 +9555,9 @@ ac_fn_c_check_func "$LINENO" "_longjmp" "ac_cv_func__longjmp" if test "x$ac_cv_func__longjmp" = xyes then : ECL_SETJMP="_setjmp";ECL_LONGJMP="_longjmp" -else $as_nop - ECL_SETJMP="setjmp";ECL_LONGJMP="longjmp" +else case e in #( + e) ECL_SETJMP="setjmp";ECL_LONGJMP="longjmp" ;; +esac fi @@ -9378,8 +9692,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : sse_included=yes -else $as_nop - sse_included=no +else case e in #( + e) sse_included=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -9404,8 +9719,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : sse_included=yes -else $as_nop - sse_included=no +else case e in #( + e) sse_included=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -9439,8 +9755,9 @@ then : printf "%s\n" "#define HAVE_FLOAT_COMPLEX 1" >>confdefs.h enable_c99complex=yes -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi ac_fn_c_check_type "$LINENO" "double complex" "ac_cv_type_double_complex" "#include " @@ -9450,8 +9767,9 @@ then : printf "%s\n" "#define HAVE_DOUBLE_COMPLEX 1" >>confdefs.h enable_c99complex=yes -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi ac_fn_c_check_type "$LINENO" "long complex" "ac_cv_type_long_complex" "#include " @@ -9461,8 +9779,9 @@ then : printf "%s\n" "#define HAVE_LONG_COMPLEX 1" >>confdefs.h enable_c99complex=yes -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi fi @@ -9470,16 +9789,17 @@ fi for ac_func in crealf creal creall cimagf cimag cimagl cabsf cabs cabsl conjf conj conjl csqrtf csqrt csqrtl ccosf ccos ccosl csinf csin csinl ctanf ctan ctanl ccoshf ccosh ccoshl csinhf csinh csinhl ctanhf ctanh ctanhl cexpf cexp cexpl cpowf cpow cpowl clogf clog clogl casinf casin casinl cacosf cacos cacosl catanf catan catanl casinhf casinh casinhl cacoshf cacosh cacoshl catanhf catanh catanhl do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF -else $as_nop - enable_c99complex=no +else case e in #( + e) enable_c99complex=no ;; +esac fi done @@ -9504,12 +9824,12 @@ printf %s "checking whether stack growns downwards... " >&6; } if test -z "${ECL_STACK_DIR}" ; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9545,11 +9865,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ECL_STACK_DIR=down -else $as_nop - ECL_STACK_DIR=up +else case e in #( + e) ECL_STACK_DIR=up ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -9567,8 +9889,8 @@ printf %s "checking for $CC options needed to detect all undeclared functions... if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_CFLAGS=$CFLAGS +else case e in #( + e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" @@ -9587,8 +9909,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - # This test program should compile successfully. +else case e in #( + e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the @@ -9616,26 +9938,29 @@ then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' -else $as_nop - ac_cv_c_undeclared_builtin_options=$ac_arg +else case e in #( + e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; +esac fi break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins -See \`config.log' for more details" "$LINENO" 5; } ;; #( +See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : @@ -9667,8 +9992,8 @@ printf %s "checking whether closedir returns void... " >&6; } if test ${ac_cv_func_closedir_void+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header_dirent> @@ -9686,10 +10011,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_closedir_void=no -else $as_nop - ac_cv_func_closedir_void=yes +else case e in #( + e) ac_cv_func_closedir_void=yes ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 printf "%s\n" "$ac_cv_func_closedir_void" >&6; } @@ -9704,8 +10031,8 @@ printf %s "checking for error_at_line... " >&6; } if test ${ac_cv_lib_error_at_line+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -9719,11 +10046,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_error_at_line=yes -else $as_nop - ac_cv_lib_error_at_line=no +else case e in #( + e) ac_cv_lib_error_at_line=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; } @@ -9742,8 +10071,8 @@ fi if test "x$ac_cv_type_pid_t" = xyes then : -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ @@ -9762,14 +10091,16 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' -else $as_nop - ac_pid_type='__int64' +else case e in #( + e) ac_pid_type='__int64' ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h - + ;; +esac fi @@ -9796,19 +10127,19 @@ printf %s "checking for working fork... " >&6; } if test ${ac_cv_func_fork_works+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_fork_works=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { - /* By Ruediger Kuhlmann. */ + /* By R. Kuhlmann. */ return fork () < 0; ; @@ -9818,13 +10149,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_fork_works=yes -else $as_nop - ac_cv_func_fork_works=no +else case e in #( + e) ac_cv_func_fork_works=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 printf "%s\n" "$ac_cv_func_fork_works" >&6; } @@ -9852,12 +10186,12 @@ printf %s "checking for working vfork... " >&6; } if test ${ac_cv_func_vfork_works+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_vfork_works=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default @@ -9968,13 +10302,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_vfork_works=yes -else $as_nop - ac_cv_func_vfork_works=no +else case e in #( + e) ac_cv_func_vfork_works=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 printf "%s\n" "$ac_cv_func_vfork_works" >&6; } @@ -10001,69 +10338,25 @@ printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h fi -if test $ac_cv_c_compiler_gnu = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -printf %s "checking whether $CC needs -traditional... " >&6; } -if test ${ac_cv_prog_gcc_traditional+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_pattern="Autoconf.*'x'" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : - ac_cv_prog_gcc_traditional=yes -else $as_nop - ac_cv_prog_gcc_traditional=no -fi -rm -rf conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : - ac_cv_prog_gcc_traditional=yes -fi -rm -rf conftest* - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 printf %s "checking for GNU libc compatible malloc... " >&6; } if test ${ac_cv_func_malloc_0_nonnull+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) + | hpux* | solaris* | cygwin* | mingw* | windows* | msys* ) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_malloc_0_nonnull=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10081,13 +10374,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop - ac_cv_func_malloc_0_nonnull=no +else case e in #( + e) ac_cv_func_malloc_0_nonnull=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } @@ -10096,8 +10392,8 @@ then : printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else case e in #( + e) printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -10107,7 +10403,8 @@ esac printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h - + ;; +esac fi @@ -10116,12 +10413,12 @@ printf %s "checking for working memcmp... " >&6; } if test ${ac_cv_func_memcmp_working+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_memcmp_working=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -10159,13 +10456,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_memcmp_working=yes -else $as_nop - ac_cv_func_memcmp_working=no +else case e in #( + e) ac_cv_func_memcmp_working=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 printf "%s\n" "$ac_cv_func_memcmp_working" >&6; } @@ -10185,8 +10485,8 @@ printf %s "checking for working mmap... " >&6; } if test ${ac_cv_func_mmap_fixed_mapped+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. @@ -10194,8 +10494,8 @@ then : # If we don't know, assume the worst. *) ac_cv_func_mmap_fixed_mapped=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ @@ -10216,21 +10516,21 @@ $ac_includes_default VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ + propagated back to all the places they're supposed to be. */ #include #include -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE +#ifndef getpagesize +/* Prefer sysconf to the legacy getpagesize function, as getpagesize has + been removed from POSIX and is limited to page sizes that fit in 'int'. */ # ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ +# define getpagesize() sysconf (_SC_PAGESIZE) +# elif defined _SC_PAGE_SIZE +# define getpagesize() sysconf (_SC_PAGE_SIZE) +# elif HAVE_GETPAGESIZE +int getpagesize (); +# else # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE @@ -10254,16 +10554,15 @@ $ac_includes_default # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ +# endif +#endif int main (void) { char *data, *data2, *data3; const char *cdata2; - int i, pagesize; + long i, pagesize; int fd, fd2; pagesize = getpagesize (); @@ -10297,8 +10596,7 @@ main (void) if (*(data2 + i)) return 7; close (fd2); - if (munmap (data2, pagesize)) - return 8; + /* 'return 8;' not currently used. */ /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that @@ -10335,13 +10633,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_mmap_fixed_mapped=yes -else $as_nop - ac_cv_func_mmap_fixed_mapped=no +else case e in #( + e) ac_cv_func_mmap_fixed_mapped=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } @@ -10357,19 +10658,19 @@ printf %s "checking for GNU libc compatible realloc... " >&6; } if test ${ac_cv_func_realloc_0_nonnull+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) + | hpux* | solaris* | cygwin* | mingw* | windows* | msys* ) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_realloc_0_nonnull=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10387,13 +10688,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_realloc_0_nonnull=yes -else $as_nop - ac_cv_func_realloc_0_nonnull=no +else case e in #( + e) ac_cv_func_realloc_0_nonnull=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } @@ -10402,8 +10706,8 @@ then : printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h +else case e in #( + e) printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -10413,7 +10717,8 @@ esac printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h - + ;; +esac fi @@ -10425,8 +10730,8 @@ printf %s "checking types of arguments for select... " >&6; } if test ${ac_cv_func_select_args+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_func_select_args='int,int *,struct timeval *' +else case e in #( + e) ac_cv_func_select_args='int,int *,struct timeval *' for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do @@ -10458,7 +10763,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done done done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 printf "%s\n" "$ac_cv_func_select_args" >&6; } @@ -10482,8 +10788,8 @@ printf %s "checking return type of signal handlers... " >&6; } if test ${ac_cv_type_signal+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -10499,10 +10805,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_type_signal=int -else $as_nop - ac_cv_type_signal=void +else case e in #( + e) ac_cv_type_signal=void ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 printf "%s\n" "$ac_cv_type_signal" >&6; } @@ -10515,8 +10823,8 @@ printf %s "checking whether lstat correctly handles trailing slash... " >&6; } if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} then : printf %s "(cached) " >&6 -else $as_nop - rm -f conftest.sym conftest.file +else case e in #( + e) rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes @@ -10527,8 +10835,8 @@ then : # If we don't know, assume the worst. *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -10546,20 +10854,23 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else $as_nop - ac_cv_func_lstat_dereferences_slashed_symlink=no +else case e in #( + e) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi else - # If the `ln -s' command failed, then we probably don't even + # If the 'ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } @@ -10583,12 +10894,12 @@ printf %s "checking whether stat accepts an empty string... " >&6; } if test ${ac_cv_func_stat_empty_string_bug+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_stat_empty_string_bug=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -10603,13 +10914,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_stat_empty_string_bug=no -else $as_nop - ac_cv_func_stat_empty_string_bug=yes +else case e in #( + e) ac_cv_func_stat_empty_string_bug=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } @@ -10630,18 +10944,15 @@ printf %s "checking for working strtod... " >&6; } if test ${ac_cv_func_strtod+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_strtod=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default -#ifndef strtod -double strtod (); -#endif int main (void) { @@ -10671,13 +10982,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_strtod=yes -else $as_nop - ac_cv_func_strtod=no +else case e in #( + e) ac_cv_func_strtod=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 printf "%s\n" "$ac_cv_func_strtod" >&6; } @@ -10700,16 +11014,22 @@ printf %s "checking for pow in -lm... " >&6; } if test ${ac_cv_lib_m_pow+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char pow (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pow (void); int main (void) { @@ -10721,21 +11041,24 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_pow=yes -else $as_nop - ac_cv_lib_m_pow=no +else case e in #( + e) ac_cv_lib_m_pow=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 printf "%s\n" "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = xyes then : POW_LIB=-lm -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 -printf "%s\n" "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 +printf "%s\n" "$as_me: WARNING: cannot find library containing definition of pow" >&2;} ;; +esac fi fi @@ -11099,12 +11422,12 @@ printf %s "checking working environ... " >&6; } if test -z "$ECL_WORKING_ENVIRON"; then if test "$cross_compiling" = yes then : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -11118,11 +11441,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ECL_WORKING_ENVIRON=yes -else $as_nop - ECL_WORKING_ENVIRON=no +else case e in #( + e) ECL_WORKING_ENVIRON=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi fi @@ -11153,8 +11478,8 @@ then : printf "%s\n" "#define HAVE_FEENABLEEXCEPT /**/" >>confdefs.h fi -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11190,12 +11515,14 @@ printf "%s\n" "#define HAVE_FEENABLEEXCEPT /**/" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi LIBS="${saved_libs}" @@ -11228,8 +11555,9 @@ if test "x${enable_threads}" != "xno"; then if test "x$ac_cv_header_atomic_ops_h" = xyes then : system_libatomic=yes -else $as_nop - system_libatomic=no +else case e in #( + e) system_libatomic=no ;; +esac fi if test "${system_libatomic}" = yes; then @@ -11249,8 +11577,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : system_libatomic=yes -else $as_nop - system_libatomic=no +else case e in #( + e) system_libatomic=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -11549,8 +11878,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -11580,14 +11909,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -11678,7 +12007,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -11687,12 +12015,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -11764,7 +12093,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -11793,7 +12122,6 @@ as_fn_error () } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -11833,11 +12161,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -11851,11 +12180,12 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -11938,9 +12268,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -12021,10 +12351,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -12040,7 +12372,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by ecl $as_me 24.5.10, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12071,7 +12403,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -12104,10 +12436,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ ecl config.status 24.5.10 -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -12167,8 +12499,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + as_fn_error $? "ambiguous option: '$1' +Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -12176,8 +12508,8 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -12247,7 +12579,7 @@ do "ecl/config.h") CONFIG_HEADERS="$CONFIG_HEADERS ecl/config.h:ecl/configpre.h" ;; "ecl/config-internal.h") CONFIG_HEADERS="$CONFIG_HEADERS ecl/config-internal.h:ecl/configpre-int.h" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -12266,7 +12598,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -12290,7 +12622,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -12448,13 +12780,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. +# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as +# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -12564,7 +12896,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -12586,19 +12918,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -12726,7 +13058,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -12756,9 +13088,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -12834,3 +13166,4 @@ fi for i in $srcdir/c/*/; do mkdir -p c/`basename $i`; done + diff --git a/src/doc/manual/extensions/building.txi b/src/doc/manual/extensions/building.txi index 71231eaa0..153fb811f 100644 --- a/src/doc/manual/extensions/building.txi +++ b/src/doc/manual/extensions/building.txi @@ -4,6 +4,7 @@ @menu * Compiling with ECL:: * Compiling with ASDF:: +* Cross compilation:: * C compiler configuration:: @end menu @c * Compiling with Matroska:: @@ -538,6 +539,212 @@ here, since our Lisp library is statically bundled with the executable. The result is the same as the shared library example above. You can also build all dependent libraries separately as static libraries. +@node Cross compilation +@subsection Cross compilation + +ECL supports cross compiling Lisp files for a target system that differs +from the host system on which the compilation takes place. This section +of the manual describes how to use this feature and explains important +things to keep in mind when cross compiling Common Lisp. + +@node Getting started with cross compilation +@subsubsection Getting started with cross compilation + +To get started, follow the steps described below: + +@enumerate +@item +Cross compile ECL itself following the steps described in @ref{Building +ECL}. +@item +Step one will create a Lisp file called @file{target-info.lsp} +containing all the information necessary for the ECL compiler to create +compiled files for the chosen target system. Load this information into +a running ECL process on the host system by calling +@code{c:read-target-info} on this file. +@item +Supply the resulting target information to the @code{:target} option of +@coderef{compile-file} or @coderef{with-compilation-unit}. +@end enumerate + +For an example, consider two files @file{a.lisp} and @file{b.lisp} which +are supposed to be linked into a shared library. This can be +accomplished with the following steps: + +@example +(defvar *target* (c:read-target-info "/path/to/ecl/installation/lib/ecl-xx.x.x/target-info.lsp")) + +(compile-file "a.lisp" :target *target* :system-p t) +(load "a.lisp") ; make macro definitions in "a.lisp" accessible to "b.lisp" +(compile-file "b.lisp" :target *target* :system-p t) + +(with-compilation-unit (:target *target*) + (c:build-shared-library "example" + :lisp-files '("a.o" "b.o") + :init-name "init_example")) +@end example + +Cross compilation using ASDF is not supported yet but is planned for the +future. + +@node Limitations and pitfalls for cross compiling Common Lisp +@subsubsection Limitations and pitfalls for cross compiling Common Lisp + +The ubiquity with which typical Common Lisp programs run code at compile +time in macros or other similar constructs makes cross compilation +somewhat more challenging than in other programming languages. Since +compilation happens on a different system than the one in which the code +generated by a macro is run, differences between the host and target +environment can lead to bugs if the macro hasn't been written with cross +compilation in mind. Consider for instance the following example macro +iterating over prime number in the range from @code{a} to @code{b}: + +@example +(defmacro do-prime-numbers ((a b) p &body body) + `(loop with ,p = (next-prime ,a) + until (> ,p ,b) + do ,(if (typep b 'fixnum) + `(locally (declare (fixnum ,p)) + ,@@body) + `(progn ,@@body)) + (setf ,p (next-prime (1+ ,p))))) +@end example + +While this macro works fine in a standard setting, it will produce +an incorrect declaration when cross compiling if the size of a fixnum +is larger in the host than in the target and the upper bound @code{b} is +larger than @code{most-positive-fixnum} in the target but smaller than +@code{most-positive-fixnum} in the host. In general, any observable +difference between target and host system may contribute to such issues. +In the list below, we collect a number of such potential issues and +explain strategies to solve them. + +@itemize +@item +Different type or subtype definitions. This may arise from differing +word sizes, as in the fixnum example above, or different feature support +such as complex floating point number support in the C compiler leading +to differing subtype relationships for complex numbers in Lisp. There +are two main strategies for dealing with this problem. +@enumerate +@item +Avoid the problem by rewriting the code not to rely on target specific +information. For instance, in the above example we can change the +declaration as follows to avoid relying on fixnums: +@example +(defmacro do-prime-numbers ((a b) p &body body) + `(loop with ,p = (next-prime ,a) + until (> ,p ,b) + do (locally (declare (type (integer ,a ,b) ,p)) + ,@@body) + (setf ,p (next-prime (1+ ,p))))) +@end example +If the declared integer type is a subtype of fixnum, the ECL compiler +will automatically take this into account and optimize the same as if a +fixnum declaration had been made. +@item +Use the lexical environment parameter to @clhs{f_typep.htm,typep} and +@clhs{f_subtpp.htm,subtypep}. Both functions take an optional parameter +which can be used to supply information about type relationships in the +target system. In the above example, this works as follows: +@example +(defmacro do-prime-numbers ((a b) p &body body &environment env) + `(loop with ,p = (next-prime ,a) + until (> ,p ,b) + do ,(if (typep b 'fixnum env) + `(locally (declare (fixnum ,p)) + ,@@body) + `(progn ,@@body)) + (setf ,p (next-prime (1+ ,p))))) +@end example +It is important, however, not to blindly modify every occurrence of +@code{typep} and @code{subtypep} in this way. Some calls to these +functions may check for types in the host environment, in which case +they should not receive an environment parameter. It is necessary to +know for which environment the call is meant in order to decide what to +do. +@end enumerate +@item +Different value of @code{*features*}, leading to mismatched @code{#+} +and @code{#-} read time conditionals. During cross compilation, +@code{*features*} will be rebound to the value in the target +system.@footnote{Changes to @code{*features*} during compilation are +carried over in the target information structure. This means that in a +scenario where one cross compiles a file @file{a.lisp} containing +@code{(eval-when (:compile-toplevel) (push :my-feature *features*))} +before cross compiling another file @file{b.lisp} containing +@code{#+my-feature}, the read time conditional in @file{b.lisp} will +evaluate to true.} However, macros that are defined in the host system +will see the host @code{*features*} during read time. Consider again the +example given above where @file{a.lisp} was cross compiled, then loaded +before @file{b.lisp} was cross compiled. If @file{a.lisp} contains a +macro definition +@example +(defmacro my-macro (...) + #+android `(do-something ...) + #-android `(do-something-else ...)) +@end example +then @code{my-macro} will expand to @code{do-something} in @file{a.lisp} +but @code{do-something-else} in @file{b.lisp} if cross compiling for the +android target. There are several ways to deal with this issue: +@enumerate +@item +Load source files containing macro definitions in an environment where +@code{*features*} has the same value as in the target system. This can +be accomplished either by wrapping @code{load} in a +@coderef{with-compilation-unit} call with a @code{:target} option given +or by using the @code{:load} keyword option of @coderef{compile-file} in +conjunction with @code{:target}. In the above example, we would compile +as follows: +@example +(compile-file "a.lisp" :target *target* :system-p t :load t) +(compile-file "b.lisp" :target *target* :system-p t) +@end example +Note that this will not work if the file contains read time conditionals +selecting between different compile time code paths due to differences +in the host system (let's say for example some code generation from a +file that is located in a different location for different compilation +hosts). +@item +Replace read time conditionals by lookups that run during macro +expansion, e.g. +@example +(defmacro my-macro (...) + (if (member :android *features*) + `(do-something ...) + `(do-something-else ...))) +@end example +@item +Add feature keywords for the target system to @code{*features*} in the +host before compilation. This is best suited for conditionals which only +add but not subtract code (keywords which only appear in @code{#+} +conditionals). In our example, we would call +@example +(push :android *features*) +@end example +before starting cross compilation. +@end enumerate +@item +Floating point accuracy issues. ECL relies on the C standard library for +numerical functions which may return slightly different values for +different systems. If your code depends sensitively on numerical +functions returning bitwise identical results, it is best not to run any +numerical code at compile time and restrict yourself to only running run +time code. +@end itemize + +Another option to avoid the aformentioned issues entirely is to use +emulation instead of cross compilation. Even if full-blown emulation is +too complicated, simply cross compiling from a version of ECL compiled +for the same word size as the target system would for instance avoid the +fixnum issues in our example macro alltogether. + +Whether the compiler is switched to cross compilation mode or not can be +diagnosed from the presence of a @code{:cross} keyword in +@code{*features*}. If necessary, this can be used to select different +code paths as well. + + @node C compiler configuration @subsection C compiler configuration diff --git a/src/doc/manual/standards/sys-constr.txi b/src/doc/manual/standards/sys-constr.txi index 95a78062c..850fe4ff6 100644 --- a/src/doc/manual/standards/sys-constr.txi +++ b/src/doc/manual/standards/sys-constr.txi @@ -1,6 +1,58 @@ @node System construction @section System construction +@node System construction - Dictionary +@subsection Dictionary + +@subsubsection Extensions + +See also @ref{System building}. + +@lspdef compile-file +@defun compile-file input-file &key output-file verbose print external-format target system-p load c-file h-file data-file +Additional options for @clhs{f_cmp_fi.htm,compile-file} include: +@table @code +@item :system-p +Create an object file (.o) +@item :target +Cross compilation target, see @ref{Cross compilation}. Can be either the +target information obtained by calling @code{c:read-target-info} or a +pathname pointing to the installation directory of the target ECL for +which to compile. +@item :load +Load the output file after compilation. If a @code{:target} argument is +given alongside @code{:load}, load the source file in the target +environment. +@item :c-file, :h-file, :data-file +Boolean flags controlling whether to keep temporary files created by the compiler +@end table +@end defun + +@lspdef compile-file-pathname +@defun compile-file-pathname input-file &key output-file type system-p +Additional options for @clhs{f_cmp__1.htm,compile-file-pathname} include: +@table @code +@item :type +Specify the type of output file. One of @code{:fasl} (default, alias @code{:fas}), @code{:c}, @code{:h}, @code{:data}, @code{:object}, @code{:program}, @code{:shared-library} (alias @code{:dll}), @code{:static-library} (alias @code{:library}, @code{:lib}), @code{:precompiled-header} or @code{:import-library} (MSVC only) +@item :system-p +If no type is supplied, default to @code{:object} type instead of @code{:fasl} +@end table +@end defun + +@lspdef with-compilation-unit +@deffn {Macro} with-compilation-unit (&key override target) &body body +Additional options for @clhs{m_w_comp.htm,with-compilation-unit} include: +@table @code +@item :target +Cross compilation target, see @ref{Cross compilation}. Any compilation +operation produces outputs for the specified target system. This +includes @clhs{f_cmp_fi.htm,compile-file}, +@clhs{f_disass.htm,disassemble} and all ECL specific functions described +in the section on @ref{Compiling with ECL}. The only exception is +@clhs{f_cmp.htm,compile} which continues to work as usual. +@end table +@end deffn + @subsection C Reference @subsubsection ANSI Dictionary diff --git a/src/lsp/autoload.lsp b/src/lsp/autoload.lsp index 60fed9682..1f3b82344 100644 --- a/src/lsp/autoload.lsp +++ b/src/lsp/autoload.lsp @@ -33,9 +33,12 @@ Gives a global declaration. See DECLARE for possible DECL-SPECs." (when (eq (car d) 'SPECIAL) (mapc #'sys::*make-special (cdr d)))) ) -(defmacro with-compilation-unit (options &rest body) +(defun si::do-compilation-unit (closure &rest options) (declare (ignore options)) - `(progn ,@body)) + (funcall closure)) + +(defmacro with-compilation-unit (options &rest body) + `(si::do-compilation-unit #'(lambda () ,@body) ,@options)) ;;; Editor. diff --git a/src/lsp/loop.lsp b/src/lsp/loop.lsp index c06d645ad..8053e1ce1 100644 --- a/src/lsp/loop.lsp +++ b/src/lsp/loop.lsp @@ -192,7 +192,8 @@ constructed. (defun make-loop-minimax (answer-variable type) (declare (si::c-local)) - (let ((infinity-data (cdr (assoc type *loop-minimax-type-infinities-alist* :test #'subtypep)))) + (let ((infinity-data (cdr (assoc type *loop-minimax-type-infinities-alist* + :test #'(lambda (t1 t2) (subtypep t1 t2 *loop-macro-environment*)))))) (make-loop-minimax-internal :answer-variable answer-variable :type type @@ -563,7 +564,7 @@ a LET-like macro, and a SETQ-like macro, which perform LOOP-style destructuring. (when (setq constantp (constantp new-form)) (setq constant-value (eval new-form))) (when (and constantp expected-type) - (unless (typep constant-value expected-type) + (unless (typep constant-value expected-type *loop-macro-environment*) (loop-warn "The form ~S evaluated to ~S, which was not of the anticipated type ~S." form constant-value expected-type) (setq constantp nil constant-value nil))) @@ -636,7 +637,7 @@ a LET-like macro, and a SETQ-like macro, which perform LOOP-style destructuring. (declare (si::c-local)) (if (null specified-type) default-type - (multiple-value-bind (a b) (subtypep specified-type required-type) + (multiple-value-bind (a b) (subtypep specified-type required-type *loop-macro-environment*) (cond ((not b) (loop-warn "LOOP couldn't verify that ~S is a subtype of the required type ~S." specified-type required-type)) @@ -975,7 +976,7 @@ collected result will be returned as the value of the LOOP." (unless (or (eq dtype t) (member (truly-the symbol name) *loop-nodeclare*)) (when (and initialization-p (constantp initialization)) (let ((init-type (type-of initialization))) - (unless (subtypep init-type dtype) + (unless (subtypep init-type dtype *loop-macro-environment*) (setf dtype `(or ,dtype ,init-type))))) ;; Allow redeclaration of a variable. This can be used by ;; the loop constructors to make the type more and more @@ -1325,7 +1326,7 @@ Note that this is not a valid ANSI code.")) (defun loop-do-repeat () (loop-disallow-conditional :repeat) (let* ((form (loop-get-form)) - (type (if (fixnump form) 'fixnum 'real)) + (type (if (typep form 'fixnum *loop-macro-environment*) 'fixnum 'real)) (var (loop-make-variable (gensym) form type)) (form `(loop-unsafe (when (minusp (decf ,var)) (go end-loop))))) (push form *loop-before-loop*) @@ -1705,10 +1706,10 @@ Note that this is not a valid ANSI code.")) ;; We can make the number type more precise when we know the ;; start, end and step values. (let ((new-type (typecase (+ start-value stepby) - (integer (if (and (fixnump start-value) + (integer (if (and (typep start-value 'fixnum *loop-macro-environment*) limit-constantp - (< limit-value most-positive-fixnum) - (> limit-value most-negative-fixnum)) + (typep (1+ limit-value) 'fixnum *loop-macro-environment*) + (typep (1- limit-value) 'fixnum *loop-macro-environment*)) 'fixnum 'integer)) (single-float 'single-float) @@ -1716,12 +1717,12 @@ Note that this is not a valid ANSI code.")) (long-float 'long-float) (short-float 'short-float) (t indexv-type)))) - (unless (subtypep (type-of start-value) new-type) + (unless (subtypep (type-of start-value) new-type *loop-macro-environment*) ;; The start type may not be a subtype of the type during ;; iteration. Happens e.g. when stepping a fixnum start ;; value by a float. (setf new-type `(or ,(type-of start-value) ,new-type))) - (unless (subtypep indexv-type new-type) + (unless (subtypep indexv-type new-type *loop-macro-environment*) (loop-declare-variable indexv new-type))) (when (and limit-constantp (setq first-test (funcall (symbol-function testfn) diff --git a/src/lsp/predlib.lsp b/src/lsp/predlib.lsp index 946a84618..bcd7c7fe2 100644 --- a/src/lsp/predlib.lsp +++ b/src/lsp/predlib.lsp @@ -476,25 +476,18 @@ and is not adjustable." answer)))) (defun upgraded-complex-part-type (real-type &optional env) - ;; ECL does not have specialized complex types. If we had them, the - ;; code would look as follows - ;; (dolist (v '(INTEGER RATIO RATIONAL SINGLE-FLOAT DOUBLE-FLOAT FLOAT REAL) - ;; (error "~S is not a valid part type for a complex." real-type)) - ;; (when (subtypep real-type v) - ;; (return v)))) - #+complex-float - (cond ((subtypep real-type 'null env) nil) - ((subtypep real-type 'rational env) 'rational) - ((subtypep real-type 'single-float env) 'single-float) - ((subtypep real-type 'double-float env) 'double-float) - ((subtypep real-type 'long-float env) 'long-float) - ((subtypep real-type 'float env) 'float) - ((subtypep real-type 'real env) 'real) - (t (error "~S is not a valid part type for a complex." real-type))) - #-complex-float - (cond ((subtypep real-type 'null env) nil) - ((subtypep real-type 'real env) 'real) - (t (error "~S is not a valid part type for a complex." real-type)))) + (if (complex-float-feature env) + (cond ((subtypep real-type 'null env) nil) + ((subtypep real-type 'rational env) 'rational) + ((subtypep real-type 'single-float env) 'single-float) + ((subtypep real-type 'double-float env) 'double-float) + ((subtypep real-type 'long-float env) 'long-float) + ((subtypep real-type 'float env) 'float) + ((subtypep real-type 'real env) 'real) + (t (error "~S is not a valid part type for a complex." real-type))) + (cond ((subtypep real-type 'null env) nil) + ((subtypep real-type 'real env) 'real) + (t (error "~S is not a valid part type for a complex." real-type))))) (defun in-interval-p (x interval) (declare (si::c-local)) @@ -1297,27 +1290,27 @@ if not possible." ;;; sets of objects. TYPEP has a different specification and TYPECASE should use ;;; it. -- jd 2019-04-19 ;;; -(defun canonical-complex-type (complex-type) +(defun canonical-complex-type (complex-type env) (declare (si::c-local)) ;; UPGRADE-COMPLEX-PART-TYPE signals condition when REAL-TYPE is not a ;; subtype of REAL. (destructuring-bind (&optional (real-type 'real)) (rest complex-type) (when (eq real-type '*) (setq real-type 'real)) - (let* ((upgraded-real (upgraded-complex-part-type real-type)) + (let* ((upgraded-real (upgraded-complex-part-type real-type env)) (upgraded-type `(complex ,upgraded-real))) (or (find-registered-tag upgraded-type) - #+complex-float - (case upgraded-real - (real - (logior (canonical-complex-type '(complex single-float)) - (canonical-complex-type '(complex double-float)) - (canonical-complex-type '(complex long-float)) - (canonical-complex-type '(complex rational)))) - (float - (logior (canonical-complex-type '(complex single-float)) - (canonical-complex-type '(complex double-float)) - (canonical-complex-type '(complex long-float))))) + (and (complex-float-feature env) + (case upgraded-real + (real + (logior (canonical-complex-type '(complex single-float) env) + (canonical-complex-type '(complex double-float) env) + (canonical-complex-type '(complex long-float) env) + (canonical-complex-type '(complex rational) env))) + (float + (logior (canonical-complex-type '(complex single-float) env) + (canonical-complex-type '(complex double-float) env) + (canonical-complex-type '(complex long-float) env))))) (register-complex-type upgraded-type))))) (defun register-complex-type (upgraded-type) @@ -1325,6 +1318,17 @@ if not possible." (let ((tag (new-type-tag))) (push-new-type upgraded-type tag))) +(defun complex-float-feature (env) + (declare (si::c-local)) + (dolist (record (car env)) + (when (and (consp record) + (eq (first record) :declare) + (eq (second record) :feature) + (eq (third record) :complex-float)) + (return-from complex-float-feature (fourth record)))) + #+complex-float t + #-complex-float nil) + ;;---------------------------------------------------------------------- ;; CONS types. Only (CONS T T) and variants, as well as (CONS NIL *), etc ;; are strictly supported. @@ -1576,7 +1580,7 @@ if not possible." (RATIO ,@(rest type))) env)) (COMPLEX - (canonical-complex-type type)) + (canonical-complex-type type env)) (CONS (apply #'register-cons-type env (rest type))) (ARRAY (logior (register-array-type `(COMPLEX-ARRAY ,@(rest type)) env) (register-array-type `(SIMPLE-ARRAY ,@(rest type)) env))) @@ -1687,6 +1691,6 @@ if not possible." (eq (second record) type-name)) (return-from search-type-in-env (if (typep (third record) 'function) - (funcall (third record) type-args) + (funcall (third record) (cons type-name type-args) env) (third record)))))) type) diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index f672a8826..2832cd402 100755 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -15,6 +15,13 @@ check: config.lsp --eval "(ext:quit)" \ 2>&1 | tee test.log +cross-check: config.lsp + $(ECL) --norc \ + --load config.lsp \ + --eval "(ecl-tests::run-tests '($(TESTS)) t)" \ + --eval "(ext:quit)" \ + 2>&1 | tee test.log + clean: rm -rf regressions.log cache @@ -26,3 +33,9 @@ ansi-test: ansi-test/doit.lsp --load config.lsp \ --eval "(ext:quit (if (ecl-tests::run-ansi-test) 0 2))" \ 2>&1 | tee ansi-test.log + +cross-ansi-test: ansi-test/doit.lsp + $(ECL) --norc \ + --load config.lsp \ + --eval "(ext:quit (if (ecl-tests::run-ansi-test nil t) 0 2))" \ + 2>&1 | tee ansi-test.log diff --git a/src/tests/config.lsp.in b/src/tests/config.lsp.in index 236191d91..f80086fd1 100755 --- a/src/tests/config.lsp.in +++ b/src/tests/config.lsp.in @@ -75,7 +75,7 @@ ;;; ;;; RUNNING TESTS ;;; -(defun run-tests (suites +(defun run-tests (suites &optional cross-compile &aux (suites (cond ((null suites) "make-check") ((null (cdr suites)) (car suites)) @@ -99,6 +99,11 @@ (merge-pathnames "tests/doit.lsp" *ecl-sources*)) "-eval" "(in-package cl-test)" + ,@(when cross-compile + `("-eval" + ,(format nil "(cl-test-cross-compile:setup ~s '(progn (load ~s) (in-package #:cl-test)))" + (namestring (truename "SYS:target-info.lsp")) + (namestring (truename (merge-pathnames "tests/doit.lsp" *ecl-sources*)))))) "-eval" ,(format nil "(2am-ecl:run '~a)" suites) "-eval" "(ext:exit)") :input nil @@ -113,7 +118,13 @@ ;;; ;;; RUNNING ANSI-TEST ;;; -(defun run-ansi-test (&optional (suite (ext:getenv "ANSI_TEST_SUITE"))) +(defun run-ansi-test (&optional + (suite (ext:getenv "ANSI_TEST_SUITE")) + cross-compile + (expected-failures + (or (ext:getenv "EXPECTED_FAILURES") + (merge-pathnames #P"tests/ansi-test-expected-failures.sexp" + *ecl-sources*)))) (ext:setenv "TEST_IMAGE" *test-image*) (zerop (nth-value @@ -129,16 +140,19 @@ ,@(cond (suite `("-eval" ,(format nil "(setf *default-pathname-defaults* ~s)" (truename #P"ansi-test/")) - "-load" "gclload1.lsp" - "-load" ,(namestring (make-pathname - :directory (list :relative suite) - :name "load" - :type "lsp")))) + "-load" "gclload1.lsp" + "-load" ,(namestring (make-pathname + :directory (list :relative suite) + :name "load" + :type "lsp")))) (t `("-load" "ansi-test/init.lsp"))) - "-eval" ,(format nil "(rt:do-tests :exit t :expected-failures ~s)" - (merge-pathnames #P"tests/ansi-test-expected-failures.sexp" - *ecl-sources*))) + ,@(when cross-compile + `("-load" ,(namestring (truename (merge-pathnames "tests/cross-compile.lisp" *ecl-sources*))) + "-eval" ,(format nil "(cl-test-cross-compile:setup ~s '(progn (in-package #:cl-user) (load ~s)))" + (namestring (truename "SYS:target-info.lsp")) + (namestring (truename "ansi-test/init.lsp"))))) + "-eval" ,(format nil "(rt:do-tests :exit t :expected-failures ~s)" expected-failures)) :input nil :output t :error :output)))) diff --git a/src/tests/cross-compile.lisp b/src/tests/cross-compile.lisp new file mode 100644 index 000000000..aab9d66fd --- /dev/null +++ b/src/tests/cross-compile.lisp @@ -0,0 +1,399 @@ +;;;; -*- Mode: Lisp; Syntax: Common-Lisp; indent-tabs-mode: nil; Package: CL-TEST-CROSS-COMPILE -*- +;;;; vim: set filetype=lisp tabstop=8 shiftwidth=2 expandtab: + +;;;; +;;;; Copyright (c) 2025, Marius Gerbershagen +;;;; +;;;; See file 'LICENSE' for the copyright details. + +;;; Cross compilation testing framework +;;; +;;; We replace COMPILE-FILE and COMPILE in the ECL running on the +;;; target system by stubs which delegate the compilation to a +;;; remote ECL cross-compiling for the target. +;;; +;;; For now, the "remote" ECL is just running on the same computer +;;; (for instance an x86 version of ECL cross compiling to x86_64). +;;; The code below contains some preparations for true remote +;;; compilation by setting set the environment variable ECL_TO_RUN to +;;; start the remote ECL on a ssh connection (or similar) but this +;;; functionality is incomplete. +;;; +;;; There are several limitations to the testing framework: +;;; +;;; 1. Function, macro or variable definitions, proclamations and +;;; other global state is not fully synchronized between the target +;;; and remote ECL. To get around this issue, we simply load the +;;; testsuite in the remote ECL before running it (which takes care +;;; of most of these issues) and replace other functions like +;;; PROCLAIM or SI::*MAKE-SPECIAL with stubs that perform their +;;; function in both the target and remote ECL. +;;; +;;; 2. The COMPILE function is implemented by writing the input out to +;;; a file, cross-compiling that file on the remote and then +;;; loading the result on the target. In general, the input cannot +;;; be written out unmodified to the file because literal objects +;;; need not be copied during compilation. To deal with this, we +;;; use the bytecodes code walker to collect literal objects in a +;;; vector, replacing references to them by load time values. +;;; Uninterned symbols are treated specially since they can appear +;;; both as literal objects and as variable or function names, +;;; making the approach of using load time values difficult. We +;;; therefore temporarily intern those symbols during compilation. +;;; +;;; This approach is enough to get the testsuite running but will +;;; break in more compilated scenarios. When encountering a test +;;; failure, one should always check if this is due to a limitation of +;;; the testing framework or an actual error. + +(defpackage #:cl-test-cross-compile + (:use #:cl) + (:export #:setup)) + +(in-package #:cl-test-cross-compile) + +;;; Remote commands + +(defvar *remote*) + +(let ((last-output "")) + (defun read-from-remote (remote read-operation) + (handler-case (with-standard-io-syntax (funcall read-operation (ext:external-process-output remote))) + (error (e) + (if (eq (ext:external-process-status remote) :running) + :unreadable + (error "Remote ECL exited: ~a" last-output))))) + + (defun skip-forward-to-first-prompt (remote) + (loop do (setf last-output + (let ((c (read-from-remote remote #'read-char))) + (unread-char c (ext:external-process-output remote)) + (if (eq c #\>) + c + (read-from-remote remote #'read-line)))) + until (eq last-output #\>)))) + +(defun skip-forward-to-prompt (remote) + (loop for x = (read-from-remote remote #'read) + until (eq x :input-prompt))) + +(defun send-command (remote command &optional ignore-result) + (skip-forward-to-prompt remote) + (with-standard-io-syntax + (write `(let ((*standard-output* (make-string-output-stream)) + warnings error result output) + (handler-bind ((style-warning + ;; To keep things simple, just catch + ;; style-warnings and do the printing on + ;; the remote host to avoid having to + ;; deal with potentially unreadable + ;; format arguments or complex warnings + ;; which are difficult to translate to + ;; the host. + #'(lambda (w) + (push (list 'c::compiler-style-warning + :format-control (format nil "~a" w)) + warnings)))) + (handler-case + (setf result (multiple-value-list ,command) + output (get-output-stream-string *standard-output*)) + (serious-condition (cl-user::e) + (setf error (format nil "~a" cl-user::e))))) + (list error warnings result output)) + :stream (ext:external-process-input remote) + :circle t)) + (terpri (ext:external-process-input remote)) + (let ((all-results (read-from-remote remote #'read)) + error warnings result output) + (when (eq all-results :unreadable) + (if ignore-result + (return-from send-command (values)) + (error "Remote command ~s failed. Can't read back output." command))) + (unless (and (listp all-results) (= (length all-results) 4)) + (format t "Unexpected output from remote: ~s " all-results) + (loop do (write-string (read-from-remote remote #'read-line)) + (terpri))) + (setf error (first all-results) + warnings (second all-results) + result (third all-results) + output (fourth all-results)) + (when error + (error "Remote command ~s failed. Got error: ~a" command error)) + (mapc #'(lambda (w) (apply #'warn w)) warnings) + (format t "~a" output) ; echo remote output + (values-list result))) + +(defun copy-file-from-remote (remote file) + (let ((bytes + (send-command remote + `(with-open-file (s ,file + :direction :input + :element-type 'ext::byte8) + (let ((bytes (make-array (file-length s) + :element-type 'ext::byte8))) + (read-sequence bytes s) + bytes))))) + (with-open-file (s file + :direction :output + :if-does-not-exist :create + :if-exists :supersede + :element-type 'ext::byte8) + (write-sequence bytes s)))) + +(defun copy-file-to-remote (remote file) + (let ((bytes + (with-open-file (s file + :direction :input + :element-type 'ext::byte8) + (let ((bytes (make-array (file-length s) + :element-type 'ext::byte8))) + (read-sequence bytes s) + bytes)))) + (send-command remote + `(with-open-file (s ,file + :direction :output + :if-does-not-exist :create + :if-exists :supersede + :element-type 'ext::byte8) + (write-sequence ,bytes s))))) + +;;; Handling literal objects and uninterned symbols for COMPILE + +(defvar *literal-objects* (make-array 8 :adjustable t :fill-pointer t)) + +(defun literal-object-p (form) + (not (or (symbolp form) (numberp form)))) + +(defun collect-literal-objects (form env) + (when (or (and (atom form) (literal-object-p form)) + (and (consp form) (eq (first form) 'quote))) + (vector-push-extend form *literal-objects*)) + (let ((head (and (consp form) (car form)))) + (case head + ;; The interpreter doesn't know about ffi special forms, so we + ;; have to handle those separately + ((ffi:clines ffi:defcbody ffi:defentry) nil) + ((ffi:c-inline ffi:c-progn) + (mapcar #'(lambda (x) (collect-literal-objects x env)) (second form)) + nil) + (otherwise form)))) + +(defun replace-literal-objects (form) + (when (and (consp form) (eq (first form) 'si:quasiquote)) + (return-from replace-literal-objects + (replace-literal-objects (macroexpand-1 form)))) + (loop for obj across *literal-objects* + for index from 0 + if (or (eq obj form) + (and (consp form) (eq (first form) 'quote) + (consp obj) (eq (first obj) 'quote) + (eq (second form) (second obj)))) + do (return-from replace-literal-objects + `(load-time-value ,(if (and (consp obj) (eq (first obj) 'quote)) + `(second (elt cl-test-cross-compile::*literal-objects* ,index)) + `(elt cl-test-cross-compile::*literal-objects* ,index))))) + (if (consp form) + (cons (replace-literal-objects (car form)) (replace-literal-objects (cdr form))) + form)) + +(defun adjoin-macros (form lexenv temp-interned-sym) + (loop for record in (cdr lexenv) + do (when (and (eq (second record) 'si:macro) + (typep (third record) 'function)) + (multiple-value-bind (macro-form macro-lexenv) + (function-lambda-expression (third record)) + (multiple-value-bind (prepared-macro-form new-temp-interned-sym) + (prepare-form macro-form macro-lexenv) + (setf form `(macrolet ((,(car record) (&whole whole &environment env) + (funcall ,prepared-macro-form whole env))) + ,form) + temp-interned-sym (append temp-interned-sym new-temp-interned-sym)))))) + (loop for record in (car lexenv) + do (when (and (eq (second record) 'si:symbol-macro) + (typep (third record) 'function)) + (multiple-value-bind (prepared-macro-form new-temp-interned-sym) + (prepare-form (funcall (third record) (car record) nil) + (nth-value (function-lambda-expression (third record)) 1)) + (setf form `(symbol-macrolet ((,(car record) ,prepared-macro-form)) + ,form) + temp-interned-sym (append temp-interned-sym new-temp-interned-sym))))) + (values form temp-interned-sym)) + +(defun intern-symbols (form) + ;; Import all uninterned symbols into temporary packages to allow + ;; them to be sent to the remote. Each symbol gets its own package + ;; to avoid name conflicts. + (cond ((and (symbolp form) (null (symbol-package form))) + (import form (make-package (symbol-name (gensym)) :use nil)) + (list form)) + ((consp form) + (nconc (intern-symbols (car form)) + (intern-symbols (cdr form)))) + (t + nil))) + +(defun remote-intern-symbols (remote symbols) + (send-command remote + `(progn + (mapc #'(lambda (n) + (make-package n :use nil)) + ',(mapcar (lambda (s) + (package-name (symbol-package s))) + symbols)) + (values)))) + +(defun intern-symbols-host-and-remote (remote form) + (remote-intern-symbols remote (intern-symbols form))) + +(defun prepare-form (form lexenv) + ;; Adjoin lexical environment + (let ((c::*cmp-env* (copy-tree c::*cmp-env-root*)) + (temporarily-interned-symbols nil)) + (setf form (c::set-closure-env form lexenv)) + (multiple-value-setq (form temporarily-interned-symbols) + (adjoin-macros form c::*cmp-env* temporarily-interned-symbols)) + (setf temporarily-interned-symbols + (append temporarily-interned-symbols (intern-symbols form))) + (let ((si::*code-walker* #'collect-literal-objects)) + (si::eval-with-env form c::*cmp-env* nil t :compile-toplevel)) + (setf form (replace-literal-objects form)) + (values form temporarily-interned-symbols))) + +(defun filter-readable-objects (obj) + (with-standard-io-syntax + (let ((printed-representation + (handler-case + (write-to-string obj :circle t) + (print-not-readable () (return-from filter-readable-objects nil))))) + ;; If the string contains #$, we are probably dealing with a + ;; random state object which is not portable across + ;; architectures with different word sizes. + (and (not (search "#$" printed-representation)) obj)))) + +;;; Cross compilation setup + +(defun setup (target-info startup-code) + (multiple-value-bind (ignored ignored remote) + (ext:run-program (ext:getenv "ECL_TO_RUN") + '("--norc") + :wait nil + :environ (remove-if #'(lambda (x) + (string= (subseq x 0 6) "ECLDIR")) + (ext:environ))) + (declare (ignore ignored)) + (let ((host-*make-special (fdefinition 'si::*make-special)) + (host-do-deftype (fdefinition 'si::do-deftype)) + (host-proclaim (fdefinition 'proclaim))) + (labels ((mirror-*make-special (sym) + (funcall host-*make-special sym) + (intern-symbols-host-and-remote remote sym) + (send-command remote `(si::*make-special ',sym))) + (mirror-do-deftype (name form function) + (funcall host-do-deftype name form function) + (intern-symbols-host-and-remote remote form) + (send-command remote form)) + (mirror-proclaim (&rest args) + (apply host-proclaim args) + (intern-symbols-host-and-remote remote args) + (send-command remote `(apply 'proclaim ',args))) + (remote-compile-file (file &rest args) + (setf file (truename file)) + (copy-file-to-remote remote file) + (let ((load-flag (getf args :load)) + (output-file (getf args :output-file))) + (remf args :load) + (remf args :output-file) + (multiple-value-bind (compiled-file warnings error) + (send-command remote + `(compile-file ,file ,@args :target *target*)) + (unless error + (copy-file-from-remote remote compiled-file) + (when output-file + (setf compiled-file + (nth-value 2 (rename-file compiled-file output-file + :if-exists :supersede)))) + (when load-flag + (load compiled-file))) + (values compiled-file warnings error)))) + (remote-compile (name &optional (def nil supplied-p)) + (let (form temporarily-interned-symbols + (lexenv nil) + (fname (or name 'C::GAZONK)) + (file "x.lisp")) + (cond ((and supplied-p def) + (when (functionp def) + (unless (function-lambda-expression def) + (return-from remote-compile def)) + (multiple-value-setq (def lexenv) + (function-lambda-expression def)) + (when (eq lexenv t) + (warn "COMPILE can not compile C closures") + (return-from remote-compile (values def t nil))))) + ((not (fboundp name)) + (error "Symbol ~s is unbound." name)) + ((typep (setf def (fdefinition name)) 'standard-generic-function) + (warn "COMPILE can not compile generic functions yet") + (return-from remote-compile (values def t nil))) + ((null (setq def (function-lambda-expression def))) + (warn "We have lost the original function definition for ~s. Compilation to C failed" + name) + (return-from remote-compile (values def t nil)))) + ;; Prepare form + (setf (fill-pointer *literal-objects*) 0) + (multiple-value-setq (form temporarily-interned-symbols) + (prepare-form `(setf (fdefinition ',fname) #',def) + lexenv)) + (remote-intern-symbols remote temporarily-interned-symbols) + (send-command remote `(progn + (setq *literal-objects* ,(map 'vector #'filter-readable-objects *literal-objects*)) + (values))) + ;; Write to file + (with-open-file (s file + :direction :output + :if-does-not-exist :create + :if-exists :supersede + :external-format :utf-8) + (with-standard-io-syntax + (print '(in-package #:cl-user) s) + (print form s))) + ;; Compile file remotely + (multiple-value-bind (compiled-file warnings error) + (remote-compile-file file) + ;; Load compiled fasl + (unless error + (load compiled-file) + (setf name (or name (fdefinition fname)))) + ;; Clean up uninterned symbols + (send-command remote `(progn + (mapc #'(lambda (s) + (let ((p (symbol-package s))) + (unintern s p) + (delete-package p))) + ',temporarily-interned-symbols) + (values))) + (mapc #'(lambda (s) + (let ((p (symbol-package s))) + (unintern s p) + (delete-package p))) + temporarily-interned-symbols) + ;; Return values + (values name warnings error))))) + (skip-forward-to-first-prompt remote) + (prin1 `(setf si::*tpl-prompt-hook* " :input-prompt ") (ext:external-process-input remote)) + (terpri (ext:external-process-input remote)) + (skip-forward-to-prompt remote) + (prin1 `(progn (cl:defpackage "CL-TEST-CROSS-COMPILE" (:use "CL")) (values)) + (ext:external-process-input remote)) + (terpri (ext:external-process-input remote)) + (send-command remote `(in-package #:cl-test-cross-compile) t) + (send-command remote `(require :cmp) t) + (send-command remote `(defvar *target* ',(c::read-target-info target-info)) t) + (send-command remote startup-code t) + (send-command remote `(defvar *literal-objects*) t) + (let ((si::*ignore-package-locks* t)) + (setf (fdefinition 'si::*make-special) #'mirror-*make-special + (fdefinition 'si::do-deftype) #'mirror-do-deftype + (fdefinition 'proclaim) #'mirror-proclaim + (fdefinition 'compile-file) #'remote-compile-file + (fdefinition 'compile) #'remote-compile)) + (setf *remote* remote))))) diff --git a/src/tests/ecl-tests.asd b/src/tests/ecl-tests.asd index 4a7c5a296..ec7b9963b 100644 --- a/src/tests/ecl-tests.asd +++ b/src/tests/ecl-tests.asd @@ -8,6 +8,7 @@ :components ((:file "1am") ; for stress tests (:file "2am") ; continuous integration (:file "ecl-tests") + (:file "cross-compile") (:file "universe") (:module normal-tests :default-component-class asdf:cl-source-file.lsp @@ -24,7 +25,7 @@ (:file "metaobject-protocol" :if-feature :clos) (:file "ieee-fp" :if-feature :ieee-floating-point) (:file "package-extensions") - (:file "hash-tables") + (:file "hash-tables") (:file "external-formats" :if-feature :unicode) (:file "unicode" :if-feature :unicode) (:file "complex") @@ -34,7 +35,7 @@ :default-component-class asdf:cl-source-file.lsp :components ((:file "multiprocessing" :if-feature :threads) - (:file "thread-sync-interrupt" :if-feature :threads))))) + (:file "thread-sync-interrupt" :if-feature :threads))))) (asdf:defsystem #:ecl-tests/stress :serial t diff --git a/src/tests/normal-tests/compiler.lsp b/src/tests/normal-tests/compiler.lsp index 253df5a2a..231b60789 100644 --- a/src/tests/normal-tests/compiler.lsp +++ b/src/tests/normal-tests/compiler.lsp @@ -1937,10 +1937,10 @@ ;;; MULTIPLE-VALUE-SETQ would wrongly assign NIL to special variables ;;; due to not saving env->nvalues before calling SET (ext:with-clean-symbols (*a* *b* foo) - (defvar *a* :wrong-a) - (defvar *b* :wrong-b) - (defun foo () (values :right-a :right-b)) (test cmp.0081.m-v-setq-special + (defvar *a* :wrong-a) + (defvar *b* :wrong-b) + (defun foo () (values :right-a :right-b)) (is (funcall (compile nil '(lambda () @@ -2142,20 +2142,19 @@ ;;; inline the new definition (e.g. because it is a closure). ;;; (test cmp.0092.inline-redefinition - (setf (compiler-macro-function 'foo) nil) (finishes (with-compiler ("inline-redefinition-1.lsp" :load t) - '(declaim (inline foo)) - '(defun foo () 1) - '(defun bar () (foo)))) - (is (eql (bar) 1)) + '(declaim (inline foo.0092)) + '(defun foo.0092 () 1) + '(defun bar.0092 () (foo.0092)))) + (is (eql (bar.0092) 1)) (finishes (with-compiler ("inline-redefinition-2.lsp" :load t) '(let ((a 2)) (defun ensure-compiler-cannot-optimize-away-the-let-statement (x) (setf a x)) - (defun foo () + (defun foo.0092 () a)) - '(defun bar () (foo)))) - (is (eql (bar) 2))) + '(defun bar.0092 () (foo.0092)))) + (is (eql (bar.0092) 2))) ;;; Date 2023-06-18 ;;; Description @@ -2571,3 +2570,35 @@ (symbol-macrolet ((value -27)) (load-time-value (block b4 (woosh b4 value)))))))))) + +;;; Date 2025-11-16 +;;; URL: https://gitlab.com/embeddable-common-lisp/ecl/-/issues/802 +;;; Regression commit: 521e815158dc92e6b8af18d007808349764b5623 +;;; Reported by: Jan Moringen +;;; Description +;;; +;;; Regression in TAGBODY handling by the C compiler. +;;; +(deftest cmp.0110.tagbody-regression () + (is (eql 42 + (funcall (compile nil + '(lambda (&aux (always-nil nil)) + (block nil + (tagbody + :package + (when always-nil + (go :package)) + :symbol + (return 42))))))))) + +;;; Date 2025-11-15 +;;; Description +;;; +;;; Target dependent constants were folded incorrectly during +;;; cross compilation +;;; +(deftest cmp.0111.cross-compilation-constant-fold () + (= (funcall (compile nil + '(lambda () + (- most-positive-fixnum 3)))) + (- most-positive-fixnum 3))) diff --git a/src/util/test-cross-compilation.sh b/src/util/test-cross-compilation.sh index 1731c9dc3..66547e15c 100755 --- a/src/util/test-cross-compilation.sh +++ b/src/util/test-cross-compilation.sh @@ -6,16 +6,74 @@ # to install additional packages for that (for example on debian, the # gcc-multilib package is needed). # +# Additional configure options for the host and target system may be +# given in the environment variables HOST_CONFIGURE_OPTS and +# TARGET_CONFIGURE_OPTS. This allows for instance to test cross +# compilation with mismatching features in both systems. +# # Four versions of ECL will be compiled: # - ecl-x86[_64]-native: direct (i.e. same host and target) x86[_64] build # - ecl-x86[_64]-native: cross build for x86[_64] target # # The results of running the test suite will be put in the files -# test-results-x86[_64]-[native/cross]. It is recommended to also run -# the ansi-tests for the output binaries. +# test-results/[make-check/ansi-test]-x86[_64]-[native/cross-core/cross-user]. +# The difference between cross-core and cross-user is that for the +# former, only the ECL core is cross compiled while the tests are run +# natively while for the latter both ECL core and the tests are cross +# compiled. # set -e -rm -rf build/; CFLAGS="-g -O2" ./configure --prefix=`pwd`/ecl-x86_64-native && make -j${JOBS} && rm -rf ecl-x86_64-native && make install && make check > test-results-x86_64-native -rm -rf build/; ABI=32 CFLAGS="-g -O2 -m32" LDFLAGS="-m32" ./configure --prefix=`pwd`/ecl-x86-native && make -j${JOBS} && rm -rf ecl-x86-native && make install && make check > test-results-x86-native -rm -rf build/; CFLAGS="-g -O2" ECL_TO_RUN=`pwd`/ecl-x86-native/bin/ecl ./configure --prefix=`pwd`/ecl-x86_64-cross --build=x86_64-pc-linux-gnu --host=x86-pc-linux-gnu --with-cross-config=`pwd`/src/util/x86_64-linux-gnu.cross_config && make -j${JOBS} && rm -rf ecl-x86_64-cross && make install && make check > test-results-x86_64-cross -rm -rf build/; ABI=32 CFLAGS="-g -O2 -m32" LDFLAGS="-m32" ECL_TO_RUN=`pwd`/ecl-x86_64-native/bin/ecl ./configure --prefix=`pwd`/ecl-x86-cross --build=x86-pc-linux-gnu --host=x86_64-pc-linux-gnu --with-cross-config=`pwd`/src/util/x86-linux-gnu.cross_config && make -j${JOBS} && rm -rf ecl-x86-cross && make install && make check > test-results-x86-cross + +mkdir -p test-results +rm -rf build/ +CFLAGS="-g -O2" ./configure --prefix=`pwd`/ecl-x86_64-native ${HOST_CONFIGURE_OPTS} +make -j4 +rm -rf ecl-x86_64-native +make install +set +e +make check > test-results/make-check-x86_64-native +make ansi-test > test-results/ansi-test-x86_64-native + +set -e +rm -rf build/ +ABI=32 CFLAGS="-g -O2 -m32" LDFLAGS="-m32" ./configure --prefix=`pwd`/ecl-x86-native ${HOST_CONFIGURE_OPTS} +make -j4 +rm -rf ecl-x86-native +make install +set +e +make check > test-results/make-check-x86-native +make ansi-test > test-results/ansi-test-x86-native + +set -e +rm -rf build/ +CFLAGS="-g -O2" ECL_TO_RUN=`pwd`/ecl-x86-native/bin/ecl ./configure --prefix=`pwd`/ecl-x86_64-cross --build=x86-pc-linux-gnu --host=x86_64-pc-linux-gnu --with-cross-config=`pwd`/src/util/x86_64-linux-gnu.cross_config ${TARGET_CONFIGURE_OPTS} +make -j4 +rm -rf ecl-x86_64-cross +make install +set +e +make check > test-results/make-check-x86_64-cross-core +ECL_TO_RUN=`pwd`/ecl-x86-native/bin/ecl make cross-check > test-results/make-check-x86_64-cross-user +make ansi-test > test-results/ansi-test-x86_64-cross-core +cp src/tests/ansi-test-expected-failures.sexp build/tests/ansi-test/expected-failures/ecl.sexp +# Bugs +echo "EPSILONS.8 EPSILONS.12" >> build/tests/ansi-test/expected-failures/ecl.sexp +# Test framework issues +echo "EVAL-WHEN.1 DEFINE-COMPILER-MACRO.3 DEFINE-COMPILER-MACRO.8 COMPILE-FILE.3 COMPILE-FILE.15 COMPILE-FILE.19 MISC.629 MISC.638" >> build/tests/ansi-test/expected-failures/ecl.sexp +ECL_TO_RUN=`pwd`/ecl-x86-native/bin/ecl EXPECTED_FAILURES="ansi-test/expected-failures/ecl.sexp" make cross-ansi-test > test-results/ansi-test-x86_64-cross-user + +set -e +rm -rf build/ +CFLAGS="-g -O2 -m32" LDFLAGS="-m32" ECL_TO_RUN=`pwd`/ecl-x86_64-native/bin/ecl ./configure --prefix=`pwd`/ecl-x86-cross --build=x86_64-pc-linux-gnu --host=x86-pc-linux-gnu --with-cross-config=`pwd`/src/util/x86-linux-gnu.cross_config ${TARGET_CONFIGURE_OPTS} +make -j4 +rm -rf ecl-x86-cross +make install +set +e +make check > test-results/make-check-x86-cross-core +ECL_TO_RUN=`pwd`/ecl-x86_64-native/bin/ecl make cross-check > test-results/make-check-x86-cross-user +make ansi-test > test-results/ansi-test-x86-cross-core +cp src/tests/ansi-test-expected-failures.sexp build/tests/ansi-test/expected-failures/ecl.sexp +# Bugs +echo "EPSILONS.1 EPSILONS.2 EPSILONS.8 EPSILONS.12" >> build/tests/ansi-test/expected-failures/ecl.sexp +# Test framework issues +echo "EVAL-WHEN.1 DEFINE-COMPILER-MACRO.3 DEFINE-COMPILER-MACRO.8 COMPILE-FILE.3 COMPILE-FILE.15 COMPILE-FILE.19 MISC.629 MISC.638" >> build/tests/ansi-test/expected-failures/ecl.sexp +ECL_TO_RUN=`pwd`/ecl-x86_64-native/bin/ecl EXPECTED_FAILURES="ansi-test/expected-failures/ecl.sexp" make cross-ansi-test > test-results/ansi-test-x86-cross-user