-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4f6ac15
Showing
7 changed files
with
755 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
|
||
SUBDIRS = src | ||
|
||
EXTRA_DIST = README.rst autogen.sh m4/* | ||
dist-hook: | ||
git clean -f | ||
|
||
dist_man_MANS = trackrdrd.3 | ||
MAINTAINERCLEANFILES = $(dist_man_MANS) | ||
|
||
trackrdrd.3: README.rst | ||
if HAVE_RST2MAN | ||
${RST2MAN} README.rst $@ | ||
else | ||
@echo "========================================" | ||
@echo "You need rst2man installed to make dist" | ||
@echo "========================================" | ||
@false | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
|
||
warn() { | ||
echo "WARNING: $@" 1>&2 | ||
} | ||
|
||
case `uname -s` in | ||
Darwin) | ||
LIBTOOLIZE=glibtoolize | ||
;; | ||
FreeBSD) | ||
LIBTOOLIZE=libtoolize | ||
;; | ||
Linux) | ||
LIBTOOLIZE=libtoolize | ||
;; | ||
SunOS) | ||
LIBTOOLIZE=libtoolize | ||
;; | ||
*) | ||
warn "unrecognized platform:" `uname -s` | ||
LIBTOOLIZE=libtoolize | ||
esac | ||
|
||
automake_version=`automake --version | tr ' ' '\n' | egrep '^[0-9]\.[0-9a-z.-]+'` | ||
if [ -z "$automake_version" ] ; then | ||
warn "unable to determine automake version" | ||
else | ||
case $automake_version in | ||
0.*|1.[0-8]|1.[0-8][.-]*) | ||
warn "automake ($automake_version) detected; 1.9 or newer recommended" | ||
;; | ||
*) | ||
;; | ||
esac | ||
fi | ||
|
||
set -ex | ||
|
||
aclocal -I m4 | ||
$LIBTOOLIZE --copy --force | ||
autoheader | ||
automake --add-missing --copy --foreign | ||
autoconf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* config.h.in. Generated from configure.ac by autoheader. */ | ||
|
||
/* Define to 1 if you have the <dlfcn.h> header file. */ | ||
#undef HAVE_DLFCN_H | ||
|
||
/* Define to 1 if you have the <inttypes.h> header file. */ | ||
#undef HAVE_INTTYPES_H | ||
|
||
/* Define to 1 if you have the <memory.h> header file. */ | ||
#undef HAVE_MEMORY_H | ||
|
||
/* Define to 1 if you have the <stdint.h> header file. */ | ||
#undef HAVE_STDINT_H | ||
|
||
/* Define to 1 if you have the <stdlib.h> header file. */ | ||
#undef HAVE_STDLIB_H | ||
|
||
/* Define to 1 if you have the <strings.h> header file. */ | ||
#undef HAVE_STRINGS_H | ||
|
||
/* Define to 1 if you have the <string.h> header file. */ | ||
#undef HAVE_STRING_H | ||
|
||
/* Define to 1 if you have the <sys/stat.h> header file. */ | ||
#undef HAVE_SYS_STAT_H | ||
|
||
/* Define to 1 if you have the <sys/types.h> header file. */ | ||
#undef HAVE_SYS_TYPES_H | ||
|
||
/* Define to 1 if you have the <unistd.h> header file. */ | ||
#undef HAVE_UNISTD_H | ||
|
||
/* Name of package */ | ||
#undef PACKAGE | ||
|
||
/* Define to the address where bug reports for this package should be sent. */ | ||
#undef PACKAGE_BUGREPORT | ||
|
||
/* Define to the full name of this package. */ | ||
#undef PACKAGE_NAME | ||
|
||
/* Define to the full name and version of this package. */ | ||
#undef PACKAGE_STRING | ||
|
||
/* Define to the one symbol short name of this package. */ | ||
#undef PACKAGE_TARNAME | ||
|
||
/* Define to the version of this package. */ | ||
#undef PACKAGE_VERSION | ||
|
||
/* Define to 1 if you have the ANSI C header files. */ | ||
#undef STDC_HEADERS | ||
|
||
/* Enable extensions on AIX 3, Interix. */ | ||
#ifndef _ALL_SOURCE | ||
# undef _ALL_SOURCE | ||
#endif | ||
/* Enable GNU extensions on systems that have them. */ | ||
#ifndef _GNU_SOURCE | ||
# undef _GNU_SOURCE | ||
#endif | ||
/* Enable threading extensions on Solaris. */ | ||
#ifndef _POSIX_PTHREAD_SEMANTICS | ||
# undef _POSIX_PTHREAD_SEMANTICS | ||
#endif | ||
/* Enable extensions on HP NonStop. */ | ||
#ifndef _TANDEM_SOURCE | ||
# undef _TANDEM_SOURCE | ||
#endif | ||
/* Enable general extensions on Solaris. */ | ||
#ifndef __EXTENSIONS__ | ||
# undef __EXTENSIONS__ | ||
#endif | ||
|
||
|
||
/* Version number of package */ | ||
#undef VERSION | ||
|
||
/* Define to 1 if on MINIX. */ | ||
#undef _MINIX | ||
|
||
/* Define to 2 if the system does not provide POSIX.1 features except with | ||
this defined. */ | ||
#undef _POSIX_1_SOURCE | ||
|
||
/* Define to 1 if you need to in order for `stat' and other things to work. */ | ||
#undef _POSIX_SOURCE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
AC_PREREQ(2.59) | ||
AC_COPYRIGHT([Copyright (c) 2011 Varnish Software AS]) | ||
AC_INIT([trackrdrd], [master]) | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
AC_CONFIG_SRCDIR(src/trackrdrd.c) | ||
AM_CONFIG_HEADER(config.h) | ||
|
||
AC_CANONICAL_SYSTEM | ||
AC_LANG(C) | ||
|
||
AM_INIT_AUTOMAKE([foreign]) | ||
|
||
AC_GNU_SOURCE | ||
AC_PROG_CC | ||
AC_PROG_CC_STDC | ||
if test "x$ac_cv_prog_cc_c99" = xno; then | ||
AC_MSG_ERROR([Could not find a C99 compatible compiler]) | ||
fi | ||
AC_PROG_CPP | ||
|
||
AC_PROG_INSTALL | ||
AC_PROG_LIBTOOL | ||
AC_PROG_MAKE_SET | ||
|
||
# Check for rst utilities | ||
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], "no") | ||
if test "x$RST2MAN" = "xno"; then | ||
AC_MSG_WARN([rst2man not found - not building man pages]) | ||
fi | ||
AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"]) | ||
|
||
# Check for pkg-config | ||
PKG_PROG_PKG_CONFIG | ||
|
||
# Checks for header files. | ||
AC_HEADER_STDC | ||
#AC_CHECK_HEADERS([sys/stdlib.h]) | ||
|
||
# Varnish source tree | ||
AC_ARG_VAR([VARNISHSRC], [path to Varnish source tree (mandatory)]) | ||
if test "x$VARNISHSRC" = x; then | ||
AC_MSG_ERROR([No Varnish source tree specified]) | ||
fi | ||
VARNISHSRC=`cd $VARNISHSRC && pwd` | ||
AC_CHECK_FILE([$VARNISHSRC/include/varnishapi.h], | ||
[], | ||
[AC_MSG_FAILURE(["$VARNISHSRC" is not a Varnish source directory])] | ||
) | ||
|
||
# From Varnish configure.ac | ||
# Now that we're done using the compiler to look for functions and | ||
# libraries, set CFLAGS to what we want them to be for our own code | ||
|
||
# This corresponds to FreeBSD's WARNS level 6 | ||
DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" | ||
|
||
# Additional flags for GCC 4 | ||
EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare" | ||
|
||
# --enable-developer-warnings | ||
AC_ARG_ENABLE(developer-warnings, | ||
AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), | ||
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") | ||
|
||
# --enable-debugging-symbols | ||
AC_ARG_ENABLE(debugging-symbols, | ||
AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), | ||
CFLAGS="${CFLAGS} -O0 -g -fno-inline") | ||
|
||
# --enable-diagnostics | ||
AC_ARG_ENABLE(diagnostics, | ||
AS_HELP_STRING([--enable-diagnostics],[enable run-time diagnostics (default is NO)]), | ||
CFLAGS="${CFLAGS} -DDIAGNOSTICS") | ||
|
||
# --enable-extra-developer-warnings | ||
AC_ARG_ENABLE(extra-developer-warnings, | ||
AS_HELP_STRING([--enable-extra-developer-warnings],[enable even stricter warnings (default is NO)]), | ||
[], | ||
[enable_extra_developer_warnings=no]) | ||
|
||
# --enable-werror | ||
AC_ARG_ENABLE(werror, | ||
AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), | ||
CFLAGS="${CFLAGS} -Werror") | ||
|
||
AC_CONFIG_FILES([ | ||
Makefile | ||
src/Makefile | ||
]) | ||
AC_OUTPUT |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
INCLUDES = -I$(VARNISHSRC)/include -I$(VARNISHSRC) | ||
|
||
bin_PROGRAMS = trackrdrd | ||
|
||
trackrdrd_SOURCES = \ | ||
trackrdrd.c | ||
$(VARNISHSRC)/lib/libvarnish/assert.c \ | ||
$(VARNISHSRC)/lib/libvarnish/flopen.c \ | ||
$(VARNISHSRC)/lib/libvarnish/version.c \ | ||
$(VARNISHSRC)/lib/libvarnish/vsb.c \ | ||
$(VARNISHSRC)/lib/libvarnish/vpf.c | ||
|
||
trackrdrd_LDADD = \ | ||
$(VARNISHSRC)/lib/libvarnishcompat/libvarnishcompat.la \ | ||
$(VARNISHSRC)/lib/libvarnishapi/libvarnishapi.la \ | ||
$(VARNISHSRC)/lib/libvarnish/libvarnish.la \ | ||
${PTHREAD_LIBS} |
Oops, something went wrong.