summaryrefslogtreecommitdiffstats
path: root/configure
Commit message (Collapse)AuthorAgeFilesLines
* build: fix broken building in separate directory.Kaz Kylheku2021-06-251-1/+1
| | | | | | | * configure: create a link farm for stdlib, not share, which no longer exists. I missed this because this is an occurrence of "share" not followed by /txr of \txr. Reported by Paul. A. Patience
* Version 264txr-264Kaz Kylheku2021-06-251-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* New: stack overflow protection.Kaz Kylheku2021-06-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure: detect getrlimit, producing HAVE_RLIMIT in config.h. * eval.c (do_eval, do_expand): Call gc_stack_check inline function to check stack pointer against limit. * gc.c (gc_stack_bottom): Static becomes extern, so inline function in gc.h can refer to it. (gc_stack_limit): New global variable. (gc_init): If we have rlimit, then probe RLIMIT_STACK. If the stack is sufficiently large, then enable the stack overflow protection, which kicks in when the stack pointer appears to be within a certain percentage of the limit. (set_stack_limit, get_stack_limit): New static functions. (gc_late_init): Register set-stack-limit and get-stack-limit intrinsics. (gc_stack_overflow): New function. * gc.h (gc_stack_bottom, gc_stack_limit, gc_stack_overflow): Declared. (gc_stack_check): New inline function. * lib.c (stack_overflow_s): New symbol variable. (obj_print_impl): Call gc_stack_check to protect recursive printing againts overflow. * lib.h (stack_overflow_s): Declared. * unwind.c (uw_init): Register stack-overflow symbol as a an exception symbol subtyped from error. (uw_unwind_to_exit_point): When dealing with an unhandled exception, turn off the stack limit, so we can print the messages without triggering it in a loop. * vm.c (vm_execute_closure, vm_funcall_common): Insert gc_stack_check to the top of the execution of every VM function. * txr.1: Documented. * share/txr/stdlib/doc-syms.tl: Updated.
* Version 263txr-263Kaz Kylheku2021-06-171-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* android: fix compiler noise about __ANDROID_API__Kaz Kylheku2021-06-171-1/+1
| | | | | | | | * configure: Termux's gcc now defines __ANDROID_API__ which clashes with our definition. We cannot remove our definition because Termux's uses a uselessly low, conservative value. Thus, add a -U to undefine it before our -D redefinition.
* Version 262txr-262Kaz Kylheku2021-06-111-1/+1
| | | | | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise. * y.tab.c.shipped: Regenerated. Good catch! forgot to do this for most recent change to parser.y.
* solaris: unbundle mkstemp and mkdtemp.Kaz Kylheku2021-06-021-2/+21
| | | | | | | | | | | | | * configure: Solaris 10 doesn't have mkdtemp, so we detect it separately from mkstemp, which Solaris 10 does have, producing HAVE_MKSTEMP and MAKE_MKDTEMP config.h symbols. * stream.c (mkdtemp_wrap): Separately surround with #if HAVE_MKDTEMP. (mkstemp_wrap): Reduce scope of #if HAVE_MKSTEMP only around this function. Bugfix here: in the #else case of #if HAVE_MKSTEMPS, we are calling the mkstemps function instead of mkstemp.
* Version 261txr-261Kaz Kylheku2021-06-011-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* New: mkdtemp and mkstemp functions.Kaz Kylheku2021-05-311-0/+21
| | | | | | | | | | | | | | | | * configure: check for mkstemp and mkdtemp. * stream.c (stdio_set_prop): Implement setting the :name property. We need this in mkstemp_wrap in order to punch in the temporary name, so that the application can retrieve it. (mkdtemp_wrap, mkstemp_wrap): New functions. (stream_init): Register mkdtemp and mkstemp intrinsics. * stream.h (mkdtemp_wrap, mkstemp_wrap): Declared. * txr.1: Documented. * share/txr/stdlib/doc-syms.tl: Updated.
* Version 260txr-260Kaz Kylheku2021-05-261-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* Version 259txr-259Kaz Kylheku2021-05-131-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* configure: reconfigure: add "$@" to configure line.Kaz Kylheku2021-05-051-2/+2
| | | | | | * configure: Allow the conveninence of additional parameters to be passed through reconfigure, to tweak the previous configuration.
* configure: bug: in-place reconfigure clobber.Kaz Kylheku2021-05-051-0/+1
| | | | | | * configure: before generating reconfigure, remove it. Otherwise, if are executing the reconfigure script, errors can appear in it if its length is extended.
* Version 258txr-258Kaz Kylheku2021-05-011-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* configure: use -ansi, not -std=c90.Kaz Kylheku2021-05-011-1/+1
| | | | | * configure: In maintainer mode, we specify C90. Some versions of clang don't like -std=c90, but only the -ansi option.
* Version 257txr-257Kaz Kylheku2021-04-231-1/+1
| | | | | | | | | | | | | | | | | Log message correction superseding original commit 65213f5f7f6a204886a02c32f259ae2617d1dfb6. * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsymc.: Likewise * share/txr/stdlib/doc-syms.tl: Likewise.
* configure: clang banner moving target.Kaz Kylheku2021-04-221-1/+1
| | | | | | * configure: nopie test must check for "clang" in two places in the version banner. Some vendors stick their name in front of "clang".
* configure: remove LIT_ALIGN.Kaz Kylheku2021-04-201-37/+0
| | | | | | | | | | | | | LIT_ALIGN was introduced before there was SIZEOF_WCHAR_T. The latter was introduced on suspicion that they might not be the same. Since LIT_ALIGN is tied to SIZEOF_WCHAR_T again there is no need for it to exist. * configure (lit_align): Variable removed. Documentation of lit-align argument removed. Alignment of wide literals test removed. Not generating LIT_ALIGN in config.h any more. * lib.h (LIT_ALIGN): Occurrences replaced with SIZEOF_WCHAR_T.
* Revert bogus LIT_ALIGN commit from 2015.Kaz Kylheku2021-04-201-5/+1
| | | | | | | | | | | | | | | | This reverts commit 0343c6f32c5bd8335e88595cb9d23506625b2586. I don't see evidence that the claim in the commit is true: that wide literals are not four-byte-aligned on Darwin in spite of sizeof(wchar_t) being 4. Not even with the old clang in my old VM where I first thought I discovered this. * configure: do not set up LIT_ALIGN == 2 for Darwin. * lib.h (litptr): Remove LIT_ALIGN < 4 && SIZEOF_WCHAR_T == 4 case. * HACKING: Undocument bogus claim.
* configure: better way to avoid -no-pie.Kaz Kylheku2021-04-201-12/+21
| | | | | | | | | | * configure (gcc_version, broken128): Formally declare existing ad hoc variables. (do_nopie): New variable. Compiler version test moved up. We use the gcc version to disable nopie, and check for clang to do the same. Instead of checking for darwin and android to skip the nopie stuff, we check do_nopie.
* configure: use $makeKaz Kylheku2021-04-201-4/+4
| | | | | | * configure: in a few tests, we are calling make as "make" rather than via the $make variable. This fails when "make" isn't GNU Make.
* Version 256txr-256Kaz Kylheku2021-04-071-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* Version 255txr-255Kaz Kylheku2021-03-261-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* M1: disable -nopie.Kaz Kylheku2021-03-241-4/+2
| | | | | * configure: Don't try to use -nopie in Darwin environments. With newer clang on the M1, it generates nuisance warnings.
* build: port to Apple M1.Kaz Kylheku2021-03-231-1/+1
| | | | | | | | | | * configure (lit_align): Also don't calculate lit_align as 2 on Darwin/arm64; that is a hack needed on 32 bit x86 Mac OS. * jmp.S: Define DEFUN for Arm64 on Darwin. We have to use %% as the statement separator; semicolons are comments. Use the same __aarch64__ code for __arm64__. We just need some Apple specific tidbits before and after.
* Version 254txr-254Kaz Kylheku2021-03-101-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* Version 253txr-253Kaz Kylheku2021-03-061-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* configure: remove yacc_is_newer_bison.Kaz Kylheku2021-03-011-3/+0
| | | | | | | * configure (yacc_is_newer_bison): Configuration variable removed. (gen_config_make): Generation of yacc_is_newer_bison make variable removed.
* build: cautiously allow parallel builds.Kaz Kylheku2021-03-011-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over two years ago, I disabled parallel building with a .NOTPARALLEL: directive in the Makefile, due to some rules that depended on order of updates of their prerequisites. Today the situation is better. It looks like there are just a few rules that have to be fixed, all in the area of executing tests. Let us not enable that by default, though, to protect downstream users from themselves. Some operating system distribution builds optimistically run make -j N on all the packages, and then have to deal with sporadic breakages when some of those packages have parallel build bugs. We can prevent TXR from ever being implicated in such a breakage by turning off parallel building even if make -j requests it. There will now be a ./configure --parallelmake option to allow parallel builds, off by default. The --maintainer configuration mode will flip that default; configuring in maintainer mode will enable parallel builds, unless explicitly disabled with --no-parallelmake. * Makefile (.NOTPARALLEL): Conditionally assert, if parallelmake is false. (tst/tests/014/dgram-stream.ok, tst/tests/014/socket-basic.ok): Enforce order between these two tests. They clash in their use of network ports so cannot run at the same time. (test.clean): test.clean must finish executing before tests; enforce order. * configure (parallelmake, parallelmake_given): New variables. (help text): Add parallelmake option to help. (gen_config_make): Generate the parallelmake make variable into config.make. New script section, defaulting parallelmake to y in maintainer mode.
* Version 252txr-252Kaz Kylheku2021-02-281-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* configure: reconfigure: spaces in argumentsKaz Kylheku2021-02-211-0/+3
| | | | | | | * configure (cmdline): We are missing the simple case when the argument contains spaces or tabs, and no quotes or special characters. This causes a badly formatted command line in reconfigure in common situations like --opt-flags="-O3 -W".
* Version 251txr-251Kaz Kylheku2021-02-081-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Re-synced to 251. * txr.vim, tl.vim: Regenerated.
* Version 250txr-250Kaz Kylheku2021-01-311-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Version 249txr-249Kaz Kylheku2021-01-191-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Version 248txr-248Kaz Kylheku2021-01-201-1/+1
| | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise.
* Version 247txr-247Kaz Kylheku2021-01-191-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped from incorrect 245 to 247. * txr.vim, tl.vim: Regenerated. * protsym.c: Regenerated.
* build: support linker flags/libs separation.Kaz Kylheku2021-01-141-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our build system lumps all linker options together. The correct way is that linker flags are separated info flags and libs. Also, we respond to the LDFLAGS variable but ignore LDLIBS which is incorrect. Other issues are fixed. All that is fixed here. * Makefile (TXR_CFLAGS): Interpolate $(CFLAGS) last, so that options coming from CFLAGS can override previous options. (TXR_LDFLAGS): Interpolate $(LDFLAGS) last; same reason. (TXR_LDLIBS): New variable. (LINK_PROG): Put $(TXR_LDFLAGS) with the options, before the -o, and put $(TXR_LDLIBS) at the end. * configure (conf_ldlibs, platform_ldlibs): New variables. (usage text): Document platform-ldlibs and adjust documentation of platform-ldflags. (gen_config_make): Generate PLATFORM_LDLIBS and CONF_LDLIBS now needed by Makefile. (mainline): Adjusts various recipes to use conf_ldlibs instead of conf_ldflags, or in some cases both. In the case of libffi where we use pkg-config, we use the special pgk-config options to separately extract the flags and libs. We use EXTRA_LDLIBS instead of EXTRA_LDFLAGS in some conftest invocations, as necessary.
* Copyright year bump 2021.Kaz Kylheku2021-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * METALICENSE: 2020 copyrights bumped to 2021. Added note about SHA-256 routines from Colin Percival. * LICENSE, LICENSE-CYG, Makefile, alloca.h, args.c, args.h, arith.c, arith.h, buf.c, buf.h, cadr.c, cadr.h, chksum.c, chksum.h, chksums/crc32.c, chksums/crc32.h, combi.c, combi.h, configure, debug.c, debug.h, eval.c, eval.h, ffi.c, ffi.h, filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c, glob.h, hash.c, hash.h, itypes.c, itypes.h, jmp.S, lex.yy.c.shipped, lib.c, lib.h, linenoise/linenoise.c, linenoise/linenoise.h, lisplib.c, lisplib.h, match.c, match.h, parser.c, parser.h, parser.l, parser.y, protsym.c, rand.c, rand.h, regex.c, regex.h, share/txr/stdlib/asm.tl, share/txr/stdlib/awk.tl, share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl, share/txr/stdlib/compiler.tl, share/txr/stdlib/conv.tl, share/txr/stdlib/copy-file.tl, share/txr/stdlib/debugger.tl, share/txr/stdlib/defset.tl, share/txr/stdlib/doloop.tl, share/txr/stdlib/each-prod.tl, share/txr/stdlib/error.tl, share/txr/stdlib/except.tl, share/txr/stdlib/ffi.tl, share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl, share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl, share/txr/stdlib/keyparams.tl, share/txr/stdlib/op.tl, share/txr/stdlib/package.tl, share/txr/stdlib/param.tl, share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl, share/txr/stdlib/pmac.tl, share/txr/stdlib/quips.tl, share/txr/stdlib/save-exe.tl, share/txr/stdlib/socket.tl, share/txr/stdlib/stream-wrap.tl, share/txr/stdlib/struct.tl, share/txr/stdlib/tagbody.tl, share/txr/stdlib/termios.tl, share/txr/stdlib/trace.tl, share/txr/stdlib/txr-case.tl, share/txr/stdlib/type.tl, share/txr/stdlib/vm-param.tl, share/txr/stdlib/with-resources.tl, share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl, signal.c, signal.h, socket.c, socket.h, stream.c, stream.h, struct.c, struct.h, strudel.c, strudel.h, sysif.c, sysif.h, syslog.c, syslog.h, termios.c, termios.h, time.c, time.h, tree.c, tree.h, txr.1, txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h, vm.c, vm.h, vmop.h, win/cleansvg.txr, y.tab.c.shipped: Copyright year bumped to 2021.
* configure: tweak test for inline.Kaz Kylheku2021-01-041-3/+2
| | | | | | | | | | | | | | | | | | | | It seems that the Brew people are running into a problem. The configure test is detecting that "inline" can be used for declaring inline functions, but then some functions are not inlined, requiring an external definition. On GNU/Linuxes, we detect "static inline", so this doesn't reproduce. This is likely triggered by the recent change to compile as C99 (unless configuring in maintainer mode). * configure: Let's revise the set of possible definitions of INLINE that we try. Firstly, we only try "inline" if we are compiling as C++. If that fails, all the other forms of inline we try include "static". Let's not mess with anything involving "extern". Like a bare "inline", it might work in the test program but cause some sort of failure.
* Version 246txr-246Kaz Kylheku2020-12-311-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Version 245txr-245Kaz Kylheku2020-10-101-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. Fixed repeated word in documentation under env-hash. * share/txr/stdlib/ver.tl: Bumped from incorrect 243 value to 245.
* configure: don't disable PIE on Android.Kaz Kylheku2020-12-231-25/+29
| | | | | | | * configure: Move how-to-disable-PIE check below plaform detections, where we know whether we have Android or not. On Android, we can't disable PIE; non-PIE executables are not supported. Let's cross our fingers things work.
* build: Android support.Kaz Kylheku2020-12-231-0/+16
| | | | | | | | | | * Makefile (conftest.android): New helper target for testing for Android toolchain, via presence of __ANDROID__ preprocessor symbol, similarly to how we detect Darwin. * configure: New test for Android. This is mutually exclusive agains Darwin. On Android, we add some necessary feature selection macros to the compiler command line.
* configure: rename darwin variable.Kaz Kylheku2020-12-231-3/+3
| | | | * configure (need_darwin_c_source): Renamed to darwin_target.
* configure: get rid of -Wold-style-declarationKaz Kylheku2020-12-231-1/+1
| | | | | | | | * configure (diag_flags): Remove the -Wold-style-declaration option. It is not useful, unlike -Wold-style-definition; it warns agains some unspecified old style usages, like storage class specifiers not being first. Moreover, clang 10 does not recognize this option and complains.
* configure: relax to C99 for regular users.Kaz Kylheku2020-12-221-2/+9
| | | | | | | | | | | The code will continue to stick to C90, but requesting C90 compatibility from GCC may break for downstream users in some environments that don't support C90 in their header files. * configure (lang_flags): Remove -ansi option from here. (usage): Help text for maintainer mode updated. (mainline): Add -std=c++98 to the front of lang_flags if compiling as C++, -std=c90 in maintainer mode, else -std=c99.
* configure: C++ fix for recently added C flags.Kaz Kylheku2020-12-221-0/+1
| | | | | | | * configure: When we detect we are using C++, we filter out certain C-only compiler options. TO that list, we must add a pattern that gets rid of the recently added -Wold-style-definitions and -Wold-style-declarations.
* configure: C++ fix for type size detection case.Kaz Kylheku2020-12-221-4/+4
| | | | | | | | | | * configure: The new logic for detecting type sizes introduced in October, replacing the old nm-based trick, doesn't work with C++. An anonymous structure is being used to define an object with linkage: we fix that by giving the structure a tag name which be. C++ also doesn't like a one-character string literal like "\n" being used to initialize a char [1] array, so we make it [2].
* build: add more warnings against ancient C.Kaz Kylheku2020-12-131-1/+3
| | | | | | * configure (diag_flags): Add warning options agains defining an old style C function, and against obsolecent features in declarations.
* Version 244txr-244Kaz Kylheku2020-10-101-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.