Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-re
Commits
f5ca7f35
Commit
f5ca7f35
authored
May 21, 2015
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to the latest build env standard from libvmod-example
parent
fde9f982
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
35 deletions
+54
-35
Makefile.am
Makefile.am
+4
-1
autogen.sh
autogen.sh
+11
-2
configure.ac
configure.ac
+31
-14
Makefile.am
src/Makefile.am
+1
-1
vmod_re.vcc
src/vmod_re.vcc
+7
-17
No files found.
Makefile.am
View file @
f5ca7f35
ACLOCAL_AMFLAGS
=
-I
m4
ACLOCAL_AMFLAGS
=
-I
m4
-I
${
LIBVARNISHAPI_DATAROOTDIR
}
/aclocal
SUBDIRS
=
src
DISTCHECK_CONFIGURE_FLAGS
=
\
VMOD_DIR
=
'$${libdir}/varnish/vmods'
dist_man_MANS
=
src/vmod_re.3
MAINTAINERCLEANFILES
=
$(dist_man_MANS)
autogen.sh
View file @
f5ca7f35
...
...
@@ -35,10 +35,19 @@ else
esac
fi
# check for varnishapi.m4 in custom paths
dataroot
=
`
pkg-config
--variable
=
datarootdir varnishapi 2>/dev/null
`
if
[
-z
"
$dataroot
"
]
;
then
cat
>
&2
<<
'
EOF
';
Package varnishapi was not found in the pkg-config search path.
Perhaps you should add the directory containing `varnishapi.pc'
to the PKG_CONFIG_PATH environment variable
EOF
exit
1
fi
set
-ex
aclocal
-I
m4
-I
${
dataroot
}
/aclocal
$LIBTOOLIZE
--copy
--force
aclocal
-I
m4
autoheader
automake
--add-missing
--copy
--foreign
autoconf
configure.ac
View file @
f5ca7f35
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2013-201
4
UPLEX Nils Goroll Systemoptimierung])
AC_INIT([libvmod-re], [
0.6
])
AC_COPYRIGHT([Copyright (c) 2013-201
5
UPLEX Nils Goroll Systemoptimierung])
AC_INIT([libvmod-re], [
trunk
])
AC_CONFIG_MACRO_DIR([m4])
m4_ifndef([VARNISH_VMOD_INCLUDES], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))
AC_CONFIG_SRCDIR(src/vmod_re.vcc)
AM_CONFIG_HEADER(config.h)
...
...
@@ -34,23 +35,39 @@ AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h])
AC_CHECK_HEADERS([pthread.h])
# backwards compat with older pkg-config
# - pull in AC_DEFUN from pkg.m4
m4_ifndef([PKG_CHECK_VAR], [
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR
])
PKG_CHECK_MODULES([libvarnishapi], [varnishapi])
PKG_CHECK_VAR([LIBVARNISHAPI_DATAROOTDIR], [varnishapi], [datarootdir])
PKG_CHECK_VAR([LIBVARNISHAPI_BINDIR], [varnishapi], [bindir])
PKG_CHECK_VAR([LIBVARNISHAPI_SBINDIR], [varnishapi], [sbindir])
AC_SUBST([LIBVARNISHAPI_DATAROOTDIR])
# Varnish include files tree
VARNISH_VMOD_INCLUDES
VARNISH_VMOD_DIR
VARNISH_VMODTOOL
# Check paths to varnishd and varnishtest
AC_ARG_VAR([VARNISHTEST], [path to varnishtest (mandatory for make check)])
AC_ARG_VAR([VARNISHD], [path to varnishd (mandatory for make check)])
AC_PATH_PROG([VARNISHTEST], [varnishtest])
AC_PATH_PROG([VARNISHD], [varnishd], [/bin/false],
[${PATH}${PATH_SEPARATOR}/usr/local/sbin${PATH_SEPARATOR}/usr/sbin])
if test "x$VARNISHD" = x; then
AC_MSG_FAILURE([Can't locate varnishd])
fi
if test "x$VARNISHTEST" = x; then
AC_MSG_FAILURE([Can't locate varnishtest])
fi
AC_PATH_PROG([VARNISHTEST], [varnishtest], [],
[$LIBVARNISHAPI_BINDIR:$LIBVARNISHAPI_SBINDIR:$PATH])
AC_PATH_PROG([VARNISHD], [varnishd], [],
[$LIBVARNISHAPI_SBINDIR:$LIBVARNISHAPI_BINDIR:$PATH])
# 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 -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
...
...
src/Makefile.am
View file @
f5ca7f35
...
...
@@ -3,7 +3,7 @@ AM_CPPFLAGS = @VMOD_INCLUDES@
vmoddir
=
@VMOD_DIR@
vmod_LTLIBRARIES
=
libvmod_re.la
libvmod_re_la_LDFLAGS
=
-module
-export-dynamic
-avoid-version
libvmod_re_la_LDFLAGS
=
-module
-export-dynamic
-avoid-version
-shared
libvmod_re_la_SOURCES
=
\
vcc_if.c
\
vcc_if.h
\
...
...
src/vmod_re.vcc
View file @
f5ca7f35
#-
# Copyright (c) 201
4
UPLEX Nils Goroll Systemoptimierung
# Copyright (c) 201
5
UPLEX Nils Goroll Systemoptimierung
# All rights reserved
#
# Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de>
...
...
@@ -214,23 +214,13 @@ This sequence should be enough in typical setups:
Alternative configs
-------------------
As with Varnish itself, you can set additional flags and macros in the
``configure`` step, and/or define environment variables to affect the
build config.
If you have installed Varnish to a non-standard directory, call
``autogen.sh`` and ``configure`` with ``PKG_CONFIG_PATH`` pointing to
the appropriate path. For example, when varnishd configure was called
with ``--prefix=$PREFIX``, use
For example, if you are building the VMOD against a Varnish instance
with a non-standard installation prefix, then set these env variables
before running ``configure``:
* PREFIX=/path/to/varnish/install/prefix
* export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
* export ACLOCAL_PATH=$PREFIX/share/aclocal
* export PATH=$PREFIX/bin:$PREFIX/sbin:$PATH
``configure`` must locate the ``varnishtest`` and ``varnishd``
binaries so that ``make check`` can be run. Usually it should be able
to find them, but if necessary you can set the variables
``VARNISHTEST`` and/or ``VARNISHD`` with the full paths.
PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
export PKG_CONFIG_PATH
For developers
--------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment