#!/bin/sh # build the C test file ... scriptname="$0" if [ "${scriptname#/}" = "${scriptname}" ]; then scriptname="${PWD}/${scriptname}" fi scriptdir="$(dirname ${scriptname})" srcdir="$(dirname $(dirname $(dirname $scriptdir)))" rm -f "$2.c" cat >>"$2.c" < #include #include /* testing specific header */ #include /* standard headers */ #include #include #include #ifdef HAVE_LIMITS_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #if HAVE_STRING_H #include #else #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif #ifdef HAVE_NETINET_IP6_H #include #endif #ifndef HAVE_INET_PTON #include "snmplib/inet_pton.h" #endif #ifndef HAVE_INET_NTOP #include "snmplib/inet_ntop.h" #endif #define ABS_SRCDIR "${srcdir}" int main(int argc, char *argv[]) { EOF echo >>"$2.c" "#line 1 \"$1\"" cat >>"$2.c" "$1" cat >>"$2.c" <