diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2013-12-10 07:36:51 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2013-12-10 07:36:51 -0800 |
commit | 434ea4f4ce65a553205f4030a6b98268ff938f0f (patch) | |
tree | 5f60474635945f1c70af6c37c78b84f9a18d0180 /configure | |
parent | 5114624a14456ae20dc8c57f9ac8ed0a5a0661f4 (diff) | |
download | txr-434ea4f4ce65a553205f4030a6b98268ff938f0f.tar.gz txr-434ea4f4ce65a553205f4030a6b98268ff938f0f.tar.bz2 txr-434ea4f4ce65a553205f4030a6b98268ff938f0f.zip |
syslog support; bitwise logior and logand functions become variadic.
* Makefile: Use -iquote to restrict our #include search paths from being
processed for #include <...>. Add syslog.o to OBJS-y if have_syslog is y.
* configure (have_syslog): New variable, set by detecting syslog API.
* eval.c (eval_init): logand and logior registrations changed to
go to variadic versions. New syslog variables and functions registered.
* lib.c (logandv, logiorv): New functions.
* lib.h (logandv, logiorv): Declared.
* txr.c (main): Call syslog_init.
* syslog.c: New file.
* syslog.h: New file.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -100,6 +100,7 @@ have_quilt= have_patch= have_unistd= have_timegm= +have_syslog= need_svid_source= need_bsd_source= @@ -573,6 +574,9 @@ compiler_prefix := $compiler_prefix # prefix for non-compiler toolchain commands tool_prefix := $tool_prefix +# do we compile in syslog support? +have_syslog := $have_syslog + # do we compile in debug support? debug_support := $debug_support @@ -1406,6 +1410,29 @@ else have_unistd=y fi +printf "Checking for syslog ... " + +cat > conftest.c <<! +#include <syslog.h> + +int main(void) +{ + openlog("foo", LOG_CONS, LOG_DAEMON); + syslog(LOG_EMERG, "bar %d\n", 3); + setlogmask(0); + closelog(); + return 0; +} +! +rm -f conftest +if ! $make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then + printf "no\n" +else + printf "yes\n" + printf "#define HAVE_SYSLOG 1\n" >> config.h + have_syslog=y +fi + # # Dependent variables # |