From 968ab01a962b96b3361a705b5b756b7430c59ac2 Mon Sep 17 00:00:00 2001 From: des Date: Fri, 24 Feb 2006 14:35:55 +0000 Subject: [PATCH] Source tree structure as agreed. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@24 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/Makefile.am | 3 + varnish-cache/autogen.sh | 10 +++ varnish-cache/bin/Makefile.am | 3 + varnish-cache/bin/varnishd/Makefile.am | 10 +++ varnish-cache/bin/varnishd/varnishd.c | 35 ++++++++++ varnish-cache/configure.ac | 73 +++++++++++++++++++++ varnish-cache/include/Makefile.am | 4 ++ varnish-cache/include/varnishapi.h | 10 +++ varnish-cache/lib/Makefile.am | 5 ++ varnish-cache/lib/libvarnish/Makefile.am | 7 ++ varnish-cache/lib/libvarnishapi/Makefile.am | 7 ++ 11 files changed, 167 insertions(+) create mode 100644 varnish-cache/Makefile.am create mode 100755 varnish-cache/autogen.sh create mode 100644 varnish-cache/bin/Makefile.am create mode 100644 varnish-cache/bin/varnishd/Makefile.am create mode 100644 varnish-cache/bin/varnishd/varnishd.c create mode 100644 varnish-cache/configure.ac create mode 100644 varnish-cache/include/Makefile.am create mode 100644 varnish-cache/include/varnishapi.h create mode 100644 varnish-cache/lib/Makefile.am create mode 100644 varnish-cache/lib/libvarnish/Makefile.am create mode 100644 varnish-cache/lib/libvarnishapi/Makefile.am diff --git a/varnish-cache/Makefile.am b/varnish-cache/Makefile.am new file mode 100644 index 00000000..0d79a4d6 --- /dev/null +++ b/varnish-cache/Makefile.am @@ -0,0 +1,3 @@ +# $Id$ + +SUBDIRS = include lib bin diff --git a/varnish-cache/autogen.sh b/varnish-cache/autogen.sh new file mode 100755 index 00000000..9346c55f --- /dev/null +++ b/varnish-cache/autogen.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# +# $Id$ +# + +libtoolize --copy --force +aclocal +autoheader +automake --add-missing --copy --force --foreign +autoconf diff --git a/varnish-cache/bin/Makefile.am b/varnish-cache/bin/Makefile.am new file mode 100644 index 00000000..c0ccec2b --- /dev/null +++ b/varnish-cache/bin/Makefile.am @@ -0,0 +1,3 @@ +# $Id$ + +SUBDIRS = varnishd diff --git a/varnish-cache/bin/varnishd/Makefile.am b/varnish-cache/bin/varnishd/Makefile.am new file mode 100644 index 00000000..4c8f6cf5 --- /dev/null +++ b/varnish-cache/bin/varnishd/Makefile.am @@ -0,0 +1,10 @@ +# $Id$ + +INCLUDES = -I$(top_srcdir)/include + +bin_PROGRAMS = varnishd + +varnishd_SOURCES = \ + varnishd.c + +#varnishd_LDADD = $(top_builddir)/lib/libvarnish/libvarnish.la diff --git a/varnish-cache/bin/varnishd/varnishd.c b/varnish-cache/bin/varnishd/varnishd.c new file mode 100644 index 00000000..262be493 --- /dev/null +++ b/varnish-cache/bin/varnishd/varnishd.c @@ -0,0 +1,35 @@ +/* + * $Id$ + */ + +#include +#include +#include +#include + +static void +usage(void) +{ + fprintf(stderr, "usage: varnishd\n"); + exit(1); +} + +int +main(int argc, char *argv[]) +{ + int o; + + while ((o = getopt(argc, argv, "")) != -1) + switch (o) { + default: + usage(); + } + + argc -= optind; + argv += optind; + + if (argc != 0) + usage(); + + exit(0); +} diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac new file mode 100644 index 00000000..b8b8ffe2 --- /dev/null +++ b/varnish-cache/configure.ac @@ -0,0 +1,73 @@ +# $Id$ + +AC_PREREQ(2.59) +AC_COPYRIGHT([Copyright (c) 2006 Linpro AS / Verdens Gang AS]) +AC_REVISION([$Id$]) +AC_INIT([Varnish], [0.1], [varnish-dev@projects.linpro.no]) +AC_CONFIG_SRCDIR([include/varnishapi.h]) +AC_CONFIG_HEADER([config.h]) + +AC_CANONICAL_SYSTEM +AC_LANG(C) + +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + +# Compiler flags (assume GCC). +# This section *must* come before AC_PROG_CC / AC_PROG_CPP. +CFLAGS="${CFLAGS:--O2}" +AC_ARG_ENABLE(wall, + AS_HELP_STRING([--enable-wall],[use -Wall (default is NO)]), + CFLAGS="${CFLAGS} -Wall") +AC_ARG_ENABLE(pedantic, + AS_HELP_STRING([--enable-pedantic],[enable pedantic warnings (default is NO)]), + CFLAGS="${CFLAGS} -pedantic") +AC_ARG_ENABLE(werror, + AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), + CFLAGS="${CFLAGS} -Werror") + +# Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LIBTOOL +AC_PROG_MAKE_SET + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_HEADER_TIME +AC_CHECK_HEADERS([sys/socket.h]) +AC_CHECK_HEADERS([netinet/in.h]) +AC_CHECK_HEADERS([stddef.h]) +AC_CHECK_HEADERS([stdlib.h]) +AC_CHECK_HEADERS([unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_CHECK_MEMBERS([struct sockaddr.sa_len],,,[ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +]) + +# Checks for library functions. +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([strerror]) +AC_FUNC_STRERROR_R +AC_CHECK_FUNCS([socket]) + +AC_CONFIG_FILES([ + Makefile + include/Makefile + lib/Makefile + lib/libvarnish/Makefile + lib/libvarnishapi/Makefile + bin/Makefile + bin/varnishd/Makefile +]) +AC_OUTPUT diff --git a/varnish-cache/include/Makefile.am b/varnish-cache/include/Makefile.am new file mode 100644 index 00000000..3e43d4e6 --- /dev/null +++ b/varnish-cache/include/Makefile.am @@ -0,0 +1,4 @@ +# $Id$ + +include_HEADERS = varnishapi.h + diff --git a/varnish-cache/include/varnishapi.h b/varnish-cache/include/varnishapi.h new file mode 100644 index 00000000..48cee312 --- /dev/null +++ b/varnish-cache/include/varnishapi.h @@ -0,0 +1,10 @@ +/* + * $Id$ + */ + +#ifndef VARNISHAPI_H_INCLUDED +#define VARNISHAPI_H_INCLUDED + +/* ... */ + +#endif diff --git a/varnish-cache/lib/Makefile.am b/varnish-cache/lib/Makefile.am new file mode 100644 index 00000000..d7e87680 --- /dev/null +++ b/varnish-cache/lib/Makefile.am @@ -0,0 +1,5 @@ +# $Id$ + +SUBDIRS = \ + libvarnish \ + libvarnishapi diff --git a/varnish-cache/lib/libvarnish/Makefile.am b/varnish-cache/lib/libvarnish/Makefile.am new file mode 100644 index 00000000..05c86ae1 --- /dev/null +++ b/varnish-cache/lib/libvarnish/Makefile.am @@ -0,0 +1,7 @@ +# $Id$ + +INCLUDES = -I$(top_srcdir)/include + +lib_LIBRARIES = libvarnish.la + +libvarnish_la_SOURCES = diff --git a/varnish-cache/lib/libvarnishapi/Makefile.am b/varnish-cache/lib/libvarnishapi/Makefile.am new file mode 100644 index 00000000..a4647c4d --- /dev/null +++ b/varnish-cache/lib/libvarnishapi/Makefile.am @@ -0,0 +1,7 @@ +# $Id$ + +INCLUDES = -I$(top_srcdir)/include + +lib_LIBRARIES = libvarnishapi.la + +libvarnishapi_la_SOURCES = -- 2.39.5