The main.c file provides a prototype for filter building.
It assumes that you will use GNU autoconf; the configure.in
file should have configuration information listed below.
AC_MSG_CHECKING(for sys_nerr)
AC_CACHE_VAL(ac_cv_decl_sys_nerr,
[AC_TRY_LINK(,[extern int sys_nerr; return (sys_nerr);],
ac_cv_decl_sys_nerr=yes, ac_cv_decl_sys_nerr=no)
])
AC_MSG_RESULT($ac_cv_decl_sys_nerr)
if test $ac_cv_decl_sys_nerr = yes; then
AC_DEFINE(HAVE_SYS_NERR)
fi;
AC_MSG_CHECKING(for sys_nerr declaration)
AC_CACHE_VAL(ac_cv_decl_sys_nerr_def,
[AC_TRY_LINK([
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif],[printf("%d",sys_nerr);],
ac_cv_decl_sys_nerr_def=yes, ac_cv_decl_sys_nerr_def=no)
])
AC_MSG_RESULT($ac_cv_decl_sys_nerr_def)
if test $ac_cv_decl_sys_nerr_def = yes; then
AC_DEFINE(HAVE_SYS_NERR_DEF)
fi
AC_MSG_CHECKING(for sys_errlist array)
AC_CACHE_VAL(ac_cv_decl_sys_errlist,
[AC_TRY_LINK(,[extern char *sys_errlist[];
sys_errlist[0];],
ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)
])
AC_MSG_RESULT($ac_cv_decl_sys_errlist)
if test $ac_cv_decl_sys_errlist = yes; then
AC_DEFINE(HAVE_SYS_ERRLIST)
fi
AC_MSG_CHECKING(for sys_errlist declaration)
AC_CACHE_VAL(ac_cv_decl_sys_errlist_def,
[AC_TRY_LINK([
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif],[printf("%s",sys_errlist[1]);],
ac_cv_decl_sys_errlist_def=yes, ac_cv_decl_sys_errlist_def=no)
])
AC_MSG_RESULT($ac_cv_decl_sys_errlist_def)
if test $ac_cv_decl_sys_errlist_def = yes; then
AC_DEFINE(HAVE_SYS_ERRLIST_DEF)
fi