Index: ossp-pkg/l2/.configure RCS File: /v/ossp/cvs/ossp-pkg/l2/Attic/.configure,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/Attic/.configure,v' | diff -u /dev/null - -L'ossp-pkg/l2/.configure' 2>/dev/null --- ossp-pkg/l2/.configure +++ - 2024-04-26 17:31:20.169435708 +0200 @@ -0,0 +1,5 @@ +#!/bin/sh +./configure \ + --prefix=/tmp/l2 \ + --disable-shared \ + --enable-debug Index: ossp-pkg/l2/AUTHORS RCS File: /v/ossp/cvs/ossp-pkg/l2/AUTHORS,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/AUTHORS,v' | diff -u /dev/null - -L'ossp-pkg/l2/AUTHORS' 2>/dev/null --- ossp-pkg/l2/AUTHORS +++ - 2024-04-26 17:31:20.172120874 +0200 @@ -0,0 +1,10 @@ + + AUTHORS + ======= + + This is a list of authors who have written + or edited major parts of the OSSP L2 sources. + + Ralf S. Engelschall + Peter Simons + Index: ossp-pkg/l2/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/l2/ChangeLog,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/ChangeLog,v' | diff -u /dev/null - -L'ossp-pkg/l2/ChangeLog' 2>/dev/null Index: ossp-pkg/l2/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/l2/ChangeLog,v co -q -kk -p'1.1.1.1' '/v/ossp/cvs/ossp-pkg/l2/ChangeLog,v' | diff -u /dev/null - -L'ossp-pkg/l2/ChangeLog' 2>/dev/null Index: ossp-pkg/l2/INSTALL RCS File: /v/ossp/cvs/ossp-pkg/l2/INSTALL,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/INSTALL,v' | diff -u /dev/null - -L'ossp-pkg/l2/INSTALL' 2>/dev/null Index: ossp-pkg/l2/INSTALL RCS File: /v/ossp/cvs/ossp-pkg/l2/INSTALL,v rcsdiff -q -kk '-r1.1' '-r1.1.1.1' -u '/v/ossp/cvs/ossp-pkg/l2/INSTALL,v' 2>/dev/null Index: ossp-pkg/l2/LICENSE RCS File: /v/ossp/cvs/ossp-pkg/l2/LICENSE,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/LICENSE,v' | diff -u /dev/null - -L'ossp-pkg/l2/LICENSE' 2>/dev/null --- ossp-pkg/l2/LICENSE +++ - 2024-04-26 17:31:20.186019386 +0200 @@ -0,0 +1,26 @@ + + L2 - OSSP Logging Library + Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) + Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) + + This file is part of OSSP L2, a flexible logging library which + can be found at http://www.ossp.com/pkg/l2/. + + Permission to use, copy, modify, and distribute this software for + any purpose with or without fee is hereby granted, provided that + the above copyright notice and this permission notice appear in all + copies. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + Index: ossp-pkg/l2/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/l2/Makefile.in,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/Makefile.in,v' | diff -u /dev/null - -L'ossp-pkg/l2/Makefile.in' 2>/dev/null --- ossp-pkg/l2/Makefile.in +++ - 2024-04-26 17:31:20.188622029 +0200 @@ -0,0 +1,214 @@ +## +## L2 - OSSP Logging Library +## Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) +## Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) +## +## This file is part of OSSP L2, a flexible logging library which +## can be found at http://www.ossp.com/pkg/l2/. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## +## Makefile.in: Autoconf Makefile skeleton +## + +@SET_MAKE@ + +TOP = . +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +libdir = @libdir@ +includedir = @includedir@ +mandir = @mandir@ + +CC = @CC@ +CXX = @CXX@ +CFLAGS = @CFLAGS@ -I. +CXXFLAGS = @CXXFLAGS@ -I. +LDFLAGS = @LDFLAGS@ -L. +LIBS = @LIBS@ +AR = @AR@ +RANLIB = @RANLIB@ +RM = rm -f +POD2MAN = pod2man +SHTOOL = ./shtool +LIBTOOL = ./libtool + +SRCS=\ +l2_stream.c \ +l2_channel.c \ +l2_ch_fd.c \ +l2_ch_file.c \ +l2_ch_pipe.c \ +l2_ch_syslog.c \ +l2_ch_socket.c \ +l2_ch_null.c \ +l2_ch_filter.c \ +l2_ch_prefix.c \ +l2_ch_buffer.c + +OBJS=\ +l2_stream.lo \ +l2_channel.lo \ +l2_ch_fd.lo \ +l2_ch_file.lo \ +l2_ch_pipe.lo \ +l2_ch_syslog.lo \ +l2_ch_socket.lo \ +l2_ch_null.lo \ +l2_ch_filter.lo \ +l2_ch_prefix.lo \ +l2_ch_buffer.lo + +_VERSION_FILE = \ + $(S)l2_version.c + +_VERSION = \ + $(SHTOOL) version -lc -nL2 -pl2_ $$OPT $(_VERSION_FILE);\ + V=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`;\ + sed -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README + +_MANPAGE = \ + V1=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \ + V2=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`; \ + D=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE) |\ + sed -e 's;.*(;;' -e 's;).*;;'`; \ + $(POD2MAN) --section=$${SEC} --center="$${ONELINE}" \ + --release="$$D" --date="$${NAME} $$V1" $(S)$${BASENAME}.pod |\ + sed -e "s;STR_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC} + +.SUFFIXES: +.SUFFIXES: .c .o .lo +.c.o: + $(CC) -c $(CFLAGS) $< +.c.lo: + $(LIBTOOL) --mode=compile --quiet $(CC) -c $(CFLAGS) $< + +all: libl2.la l2_test l2.3 l2-config.1 + +libl2.la: $(OBJS) + $(LIBTOOL) --mode=link --quiet $(CC) -o libl2.la $(OBJS) -rpath $(libdir) \ + -version-info `$(SHTOOL) version -l c -d libtool l2_version.c` + +l2_test: l2_test.o libl2.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_test l2_test.o libl2.la $(LIBS) + +l2-config.1: l2-config.pod $(_VERSION_FILE) + BASENAME="l2-config"; SEC=1; \ + NAME="L2"; ONELINE="Logging Library"; \ + $(_MANPAGE) +l2.3: l2.pod $(_VERSION_FILE) + BASENAME="l2"; SEC=3; \ + NAME="L2"; ONELINE="Logging Library"; \ + $(_MANPAGE) + +check: test +test: l2_test + $(LIBTOOL) --mode=execute ./l2_test + +install: all + $(SHTOOL) mkdir -p -f -m 755 $(bindir) + $(SHTOOL) mkdir -p -f -m 755 $(includedir) + $(SHTOOL) mkdir -p -f -m 755 $(libdir) + $(SHTOOL) mkdir -p -f -m 755 $(mandir)/man1 + $(SHTOOL) mkdir -p -f -m 755 $(mandir)/man3 + $(SHTOOL) install -c -m 755 l2-config $(bindir)/l2-config + $(SHTOOL) install -c -m 644 l2-config.1 $(mandir)/man1/l2-config.1 + $(SHTOOL) install -c -m 644 l2.3 $(mandir)/man3/l2.3 + $(SHTOOL) install -c -m 644 l2.h $(includedir)/l2.h + @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libl2.la $(libdir)/libl2.la + +clean: + $(RM) *.lo *.o + $(RM) l2_test.o l2_test + $(RM) libl2.la + $(RM) -r .libs + +distclean: clean + $(RM) l2-config + $(RM) l2_config.h + $(RM) config.log config.cache config.status + $(RM) libtool + $(RM) Makefile + +dist: distclean + @$(SHTOOL) fixperm -v .; \ + V=`$(SHTOOL) version -l c -d short l2_version.c`; \ + $(SHTOOL) tarball -o l2-$${V}.tar.gz -d str-$${V} -u ossp -g ossp \ + -e 'CVS,\.cvsignore,\.[ao],^\.' -c 'gzip --best' . + +# increase or update version information +new-version: + @V="$(VERSION)"; \ + if [ ".$$V" != . ]; then \ + OPT="-s$$V"; \ + else \ + OPT="-e"; \ + fi; \ + $(_VERSION) +update-version: + @OPT="-s`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`" && $(_VERSION) + +update: + @$(RM) ltmain.sh ltconfig shtool + @$(MAKE) $(MFLAGS) ltmain.sh ltconfig configure shtool +configure: configure.in aclocal.m4 + $(RM) configure + autoconf +ltmain.sh: + @F=`libtoolize -n -c -f | grep 'cp.*ltmain.sh' |\ + sed -e 's;[^/]*;;' -e 's; .*;;'`; \ + echo "ltmain.sh <-- $$F"; cat $$F |\ + sed -e 's:/bin/sh; then:/bin/sh || test "$$nonopt" = ./shtool;then:' \ + -e 's:exec \$$SHELL \$$0 --finish:exit 0 #:' >ltmain.sh +ltconfig: + @F=`libtoolize -n -c -f | grep 'cp.*ltconfig' | sed -e 's;[^/]*;;' -e 's; .*;;'`; \ + echo "ltconfig <-- $$F"; cp $$F . +shtool: + shtoolize -o shtool echo version mkdir install fixperm tarball + +# create dependencies +depend: + cp Makefile.in Makefile.in.bak \ + && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \ + && $(CC) -MM $(CPPFLAGS) $(CFLAGS) *.c |\ + sed -e 's/^\(pth_.*\)\.o:/\1.lo:/' >> Makefile.new \ + && cp Makefile.new Makefile.in + && rm -f Makefile.new + +## +## ____ DEPENDENCY AREA ____________________________________________ +## (AUTOMATICALLY UPDATED - DO NOT EDIT) +## + +$(LOBJS): Makefile + +l2_ch_buffer.o: l2_ch_buffer.c l2.h l2_p.h +l2_ch_fd.o: l2_ch_fd.c l2.h l2_p.h +l2_ch_file.o: l2_ch_file.c l2.h l2_p.h +l2_ch_filter.o: l2_ch_filter.c l2.h l2_p.h +l2_ch_null.o: l2_ch_null.c l2.h l2_p.h +l2_ch_pipe.o: l2_ch_pipe.c l2.h l2_p.h +l2_ch_prefix.o: l2_ch_prefix.c l2.h l2_p.h +l2_ch_socket.o: l2_ch_socket.c l2.h l2_p.h +l2_ch_syslog.o: l2_ch_syslog.c l2.h l2_p.h +l2_channel.o: l2_channel.c l2.h l2_p.h +l2_stream.o: l2_stream.c l2.h l2_p.h +l2_test.o: l2_test.c l2.h +l2_version.o: l2_version.c l2_version.c Index: ossp-pkg/l2/NEWS RCS File: /v/ossp/cvs/ossp-pkg/l2/NEWS,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/NEWS,v' | diff -u /dev/null - -L'ossp-pkg/l2/NEWS' 2>/dev/null Index: ossp-pkg/l2/NEWS RCS File: /v/ossp/cvs/ossp-pkg/l2/NEWS,v rcsdiff -q -kk '-r1.1' '-r1.1.1.1' -u '/v/ossp/cvs/ossp-pkg/l2/NEWS,v' 2>/dev/null Index: ossp-pkg/l2/README RCS File: /v/ossp/cvs/ossp-pkg/l2/README,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/README,v' | diff -u /dev/null - -L'ossp-pkg/l2/README' 2>/dev/null --- ossp-pkg/l2/README +++ - 2024-04-26 17:31:20.197618278 +0200 @@ -0,0 +1,46 @@ + _ ____ + | | |___ \ + | | __) | + | |___ / __/ + |_____|_____| + + L2 - Logging Library + Version 0.1.0 (14-Jul-2000) + + ABSTRACT + + The L2 library is [...] + + COPYRIGHT AND LICENSE + + Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) + Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) + + This file is part of OSSP L2, a flexible logging library which + can be found at http://www.ossp.com/pkg/l2/. + + Permission to use, copy, modify, and distribute this software for + any purpose with or without fee is hereby granted, provided that + the above copyright notice and this permission notice appear in all + copies. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + HOME AND DOCUMENTATION + + The documentation and latest release can be found on + + o http://www.ossp.org/pkg/l2/ + o ftp://ftp.ossp.org/pkg/l2/ + Index: ossp-pkg/l2/TODO RCS File: /v/ossp/cvs/ossp-pkg/l2/TODO,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/TODO,v' | diff -u /dev/null - -L'ossp-pkg/l2/TODO' 2>/dev/null --- ossp-pkg/l2/TODO +++ - 2024-04-26 17:31:20.200280389 +0200 @@ -0,0 +1,157 @@ + +OSSP liblog +=========== + +Braindump: +- debugging is special case of logging +- tracing is special case of debugging + +License: +- ISC/MIT/BSD + +Sprache: +- C++ +- C + +Aufbau: +1. Layer C++ API log.hpp, log.cpp +2. Layer C API log.h log.c +3. Layer C Backend backend.h backend.c +- "make striptease" + +- optimierung: +log(..) +{ +} +: +log(....); +: + +API Levels: +- PANIC (-> LOG_EMERG) +- CRITICAL (-> LOG_CRIT) +- ERROR (-> LOG_ERR) +- WARNING +- NOTICE +- INFO +- TRACE (-> LOG_DEBUG) +- DEBUG (-> LOG_DEBUG) + +Level Entscheidungen: +>= (default) +<= += +; +* + +Backend Channels: +1 Level -> N Channels +- file (append) +- program (stdin) +- syslog +- stderr/stdout +- null (discard, nicht nur /dev/null) +- filedescriptor (escape/ext) +- callback function + +Log Messages: +- raw +- optional prefixes (inclusive order): + string + facility + level + timestamp + pid + (tid) +- errno (like syslog %m) +- eigene %{foo}x mit callback function mit context +- automatisch: number -> string mapping (fuer error strings) +- __FILE__, __LINE__, (__FUNCTION__) + +Configuration: +- ueber C/C++ API +- zusaetzlich Config-File + 1. /etc/liblog.conf + 2. (in ., .., ../..) + 3. $HOME/.liblog.conf + +- !debug -> !code + +API C (ala MM): +- reentrant: log_xxx +- non-reentrant: Log_xxx + +Message Filtering/Masking: +- facility und/oder levels und/oder wildcard pattern + +API Using: +- C++: + LogManager logm; + logm.debug1("test"); + logm.configure(" + +- C: + log lh; + lh = log_init(LOG_CFGFILE|LOG_CFGPARENT|LOG_XXX|..., "foo" (=facility)); + log_configure(lh, "foo", LOG_WARN|LOG_LESSER, null); + log_cb(lh, "x", func, ctx); + int func(void *ctx, char *str, ...); + log_msg(lh, LOG_WARN, "..%{foo}x %s...%E..", cp); + log_dbg(lh, "..%{foo}x %s...%E..", cp); + log_kill(lh); + +- Buffered I/O: + fuer manche channels non-buffered (debug, errors) + fuer manche andere aber buffered (access log, performance) + loesung: I/O ueber callbacks (3x: open, write, close) z.B. RRDTool + +- Varargs: + log ist nur wrapper fuer vlog + +- Source Tree: + README .......... information about package + INSTALL ......... instructions for installation + LICENSE ......... license information + TODO ............ to-do list + ChangeLog ....... history of all changes + Makefile.in ..... build specification + configure.in .... GNU Autoconf script source + aclocal.m4 ...... GNU Autoconf internal macros + libtool ......... GNU Libtool utility + shtool .......... GNU Shtool utility + l2.m4 ........... GNU Autoconf public macro AC_L2() + l2-config.in .... configuration utility script + l2.h ............ C API definition + l2.c ............ C API+internals implementation + l2.hh ........... C++ API definition + l2.cc ........... C++ API implementation + l2.pod .......... Unix manual page source (POD format) + l2_test.c ....... Test application + +- Error Handling: + o log kein Return Code + o aber error callback function (dadrin in C++: throw, in C: exit) + +- Newline Handling: + option fuer channel: \r, \r\n, \n oder gleich string + und moeglichkeit gar nix (string="") + +- Perhaps: + optionally reopen logfile on each write + +- An optional syslog(3) compatible API for converting syslog-only based + applications (like sendmail) to (restricted) liblog-based applications. + +- Ein Wort noch zu variablen Argumentlisten in cpp-Makros: gcc + unterstützt dies in in der GNU- und der C99-Ausführung. Das heißt, + der "..." Parameter kann im Makro respektive über "args" und über + "__VA_ARGS__" angesprochen werden. Wichtig ist dabei, daß "..." + nicht leer sein -- also kein Argument enthalten -- darf, da sonst + der Präprocessor an einem eventuell vorhandenen Komma scheitert. + Dies kann beim gcc durch Voranstellen von "##" vor dem "__VA_ARGS__" + umgangen werden. Ouch. + + Beide Erweiterungen sind derzeit nicht aktiv, wenn mit -ansi + compiliert wird. Explizit anschalten läßt sich die standard-konforme + Erweiterung über "-std=c9x", bzw. "-std=c99" bei neueren gccs. + Index: ossp-pkg/l2/aclocal.m4 RCS File: /v/ossp/cvs/ossp-pkg/l2/aclocal.m4,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/l2/aclocal.m4,v' | diff -u /dev/null - -L'ossp-pkg/l2/aclocal.m4' 2>/dev/null --- ossp-pkg/l2/aclocal.m4 +++ - 2024-04-26 17:31:20.203245724 +0200 @@ -0,0 +1,214 @@ +dnl ## +dnl ## L2 - OSSP Logging Library +dnl ## Copyright (c) 2001 The OSSP Project (http://www.ossp.org/) +dnl ## Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/) +dnl ## +dnl ## This file is part of OSSP L2, a flexible logging library which +dnl ## can be found at http://www.ossp.com/pkg/l2/. +dnl ## +dnl ## Permission to use, copy, modify, and distribute this software for +dnl ## any purpose with or without fee is hereby granted, provided that +dnl ## the above copyright notice and this permission notice appear in all +dnl ## copies. +dnl ## +dnl ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +dnl ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +dnl ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +dnl ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +dnl ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +dnl ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +dnl ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +dnl ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +dnl ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +dnl ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl ## SUCH DAMAGE. +dnl ## +dnl ## configure.in: Autoconf specification +dnl ## + +dnl ## +dnl ## Support for Platform IDs +dnl ## +dnl ## configure.in: +dnl ## AC_PLATFORM() +dnl ## + +AC_DEFUN(AC_PLATFORM,[ +if test ".$host" != .NONE; then + $1="$host" +elif test ".$nonopt" != .NONE; then + $1="$nonopt" +else + $1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` +fi +$1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub $$1` || exit 1 +AC_SUBST($1) +if test ".$enable_subdir" != .yes; then + echo "Platform: ${TB}${$1}${TN}" +fi +])dnl + +dnl ## +dnl ## Support for Configuration Headers +dnl ## +dnl ## configure.in: +dnl ## AC_HEADLINE(, , +dnl ## , , +dnl ## ) +dnl ## + +AC_DEFUN(AC_HEADLINE,[dnl +AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +# configuration header +if test ".`echo dummy [$]@ | grep help`" = .; then + # bootstrapping shtool + ac_prog=[$]0 +changequote(, )dnl + ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'` +changequote([, ])dnl + test ".$ac_srcdir" = ".$ac_prog" && ac_srcdir=. + ac_shtool="$ac_srcdir/shtool" + + # find out terminal sequences + TB=`$ac_shtool echo -n -e %B 2>/dev/null` + TN=`$ac_shtool echo -n -e %b 2>/dev/null` + + # find out package version + $3_STR="`$ac_shtool version -l c -d long $ac_srcdir/$4`" + AC_SUBST($3_STR) + + # friendly header ;) + echo "Configuring ${TB}$1${TN} ($2), Version ${TB}${$3_STR}${TN}" + echo "$5" + + # additionally find out hex version + $3_HEX="`$ac_shtool version -l c -d hex $ac_srcdir/$4`" + AC_SUBST($3_HEX) +fi +AC_DIVERT_POP() +])dnl + +dnl ## +dnl ## Check whether compiler option works +dnl ## +dnl ## configure.in: +dnl ## AC_COMPILER_OPTION(, ,