It does not use autoconf, autotools, automake, or any other of those GNU tools, But it takes some of the good ideas and conventions from them, as explained by Nelson Beebe of the maths department of the University of Utah. This should make it even easier to package newLISP for the different Unix and POSIX variants.
To use it, simply download this patch and apply it: http://reactor-core.org/downloads/newli ... gure.patch
Then type ./configure. To use this system, you can't omit this step. Configure now takes the following options:
Code: Select all
--enable-readline
--disable--readline
--enable-utf8
--disable-utf8
--enable-ipv6
--disable-ipv6
The script defaults to turning on all three knobs; UTF8, readline, and IPv6. The patch also fixes a syntax error in the IPv6 code.
Configure now generates two files, config.h, and makefile_configure
On my OpenBSD system, the config.h looks like this:
Code: Select all
/* This platform is using the LP64 memory model */
#define NEWLISP64
/* Operating System Type */
#define _BSD
/* UTF8 support was chosen */
#define SUPPORT_UTF8
/* READLINE support was chosen */
#define READLINE
/* IPv6 support was chosen */
#define IPV6
/* EOF */
Here is what the resulting makefile_configure looks like:
Code: Select all
CC = cc
CFLAGS = -Wall -Wno-uninitialized -fno-strict-aliasing -DNEWCONFIG -O2 -c
LIBS = -lm -lreadline -lncurses
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o
default: $(OBJS)
$(CC) $(OBJS) $(LIBS) -o newlisp
strip newlisp
.c.o:
$(CC) $(CFLAGS) $<
$(OBJS): primes.h protos.h makefile_configure
To compile newlisp, you type this command:
Code: Select all
./configure
make -f makefile_configure
make install
Also, by having all the knobs turned on, hopefully we can get IPv6 more broadly tested. And on those few platforms without readline, the --disable-readline options to configure will turn it off.
This system should free people from having to edit makefiles to tweak them for their system.
Any comments welcome.