configure[.ac]: Arrange to cope with jessie's gcc Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
portability: Provide implementation of fmemopen We are going to want one of these. I have tested it as follows: 1. In configure.ac just before AC_CHECK_FUNCS, add: LIBS+=-lbsd 2. In osdep.c, add: #include <bsd/stdio.h> 3. Change all fmemopen to Yfmemopen, with git-ls-files | perl -lne 'print if lstat and -f _' | xargs perl -i~ -pe 's/fmemopen/Y$&/gi' The result is that we do not find Yfmemopen. The tests still pass and I have verified that my stunt implementation is called. FTR, this rune undoes the Y: git-ls-files | perl -lne 'print if lstat and -f _' | xargs perl -i~ -pe 's/Y(fmemopen)/$1/gi' Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
base91: Build the C basE91 code with our own renaming We want to use a variant character set. This will mean patching the library. (That will happen in a moment.) It seems unwise, and perhaps rude, to make a thing that has the same name as the official basE91 but has a different and incompatible encoding. So we change all the names: `basE91' and `base91' become base91s. We don't change the leaf filenames because that's rather inconvenient. We do put it all in a base91s subdirectory. Rather than running the basE91 upstream makefile, or trying to sed it, or something, we simply make our own makefile. It is simple enough. The only complication is that the "source" files are all actually made by this name substitution perl rune. Overall, the chief result is that we build a base91s/base91s utility, by default. Right now it does not have our charset change, so it is not ready for use yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
configure.ac: Do not check for lack of standard headers This makes configure rather faster. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
configure.ac: Drop AC_STDC_HEADERS This is obsolete, as the docs say: AC_STDC_HEADERS Replaced by 'AC_HEADER_STDC' AC_HEADER_STDC This macro is obsolescent, as current systems have conforming header files. New programs need not use this macro. Unfortunately dropping it is not properly effective because it's implied by some other stuff. We are going to deal with that in a moment. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
configure.ac: Drop checks for systems lacking stdint.h Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
subdirmk: Merge new version and fix everything git subtree pull, but many incompatible changes - so also fixed up the secnet code to match. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build system: convert stest and mtest to Subdir.mk Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build system: Convert test-example to subdirmk Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build system: Use SUBDIRMK_MAKEFILES for common.make etc. This wires them properly into regen.mk. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build system: Do not use autoconf's `rm' This is /bin/rm. But make's builtin is `rm -f' which is better. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Switch to using subdirmk for the top-level We have incorporated the subdirectories yet... Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
mtest: Provide a makefile to run the tests Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build system: Break out test-common.make Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build system: Process test-example with autoconf This makes configure make the directory during out-of-tree builds. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
stest: Rename from `test' We want other tests too. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build system: Rename stamp-h to config.stamp This makes more sense and gets it out of the way of "st..." tab completion which we are going to want in a momen. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
test: udp-preload: Build system Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefiles: Break some settings out into common.make No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
configure.in, conffile.fl: Remove dependency on `libfl.a'. The `libfl' library contains two functions: * `main', which basically just calls `yylex' a lot, as an easy way to write simple programs in lex(1); and * `yywap', which lets a lex(1)-generated lexer know what to do when it encounters end-of-file. Specifically, it can return nonzero to say `that's it, we're done', or zero to say `there's more: I've set up ``yyin'' so that you can read more stuff'. The library doesn't do anything very sensible for `yywrap': it just always returns 1. (If you wanted to do something more complicated, you should just write `yywrap' yourself.) Secnet has its own `main' function which is fine. It wants `yywrap', though. This causes trouble with upstream `flex', which nowadays builds a shared `libfl.so' library. This contains /both/ `yywrap' /and/ `main', which breaks the `configure' test: what happens is that the test program requires `yywrap', which brings in `libfl.so', which brings in its `main', which refers to an undefined symbol `yylex' that's not defined in the test program. This doesn't go wrong in Debian, because Debian replaces the shared-library `libfl.so' with a linker script which says `oh, no, you don't want this: you want that ``libfl_pic.a'' over there'. The latter is a traditional archive, and ld(1) can pick `yywrap' out of it without pulling in the bogus `main' and its dependency on `yylex'. Anyway, this is all more trouble than it's worth. Define our own `yywrap' in `conffile.fl', and delete the `configure' machinery. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>