Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Updated autotools to latest V4/V5 m4 files. #9

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ Makefile.in
*.lo
*.la
*~
*.[1-9]
*.log
*.trs

/aclocal.m4
/autom4te.cache/
/compile
/config.guess
/build-aux/
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/configure
/depcomp
/install-sh
/libtool
/ltmain.sh
/missing
/stamp-h1
/m4/

/src/vcc_if.c
/src/vcc_if.h
/vmod_urlcode.3
/nbproject/private/
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4

/src/vcc_*_if.c
/src/vcc_*_if.h
/src/vmod_*rst
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
sudo: required
dist: trusty

language: c

addons:
apt:
packages:
- python-docutils

before_install:
- set -e
- wget https://repo.varnish-cache.org/source/varnish-5.0.0.tar.gz
- tar -zxf varnish-*.tar.gz
- pushd varnish-*/
- ./configure --prefix=/usr
- make -sj32
- sudo make install
- popd

before_script:
- ./autogen.sh
- ./configure --prefix=/usr
- make -j4

script:
- make check -j4

compiler:
- clang
- gcc
12 changes: 12 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This is a running log of changes to libvmod-urlcode.

libvmod-urlcode 1.1 (unreleased)
--------------------------------

* Updated autotools to be compatible with latest V4/V5 core m4 versions

libvmod-urlcode 1.0 (unreleased)
--------------------------------

* initial encode function
* initial decode function
17 changes: 2 additions & 15 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
ACLOCAL_AMFLAGS = -I m4 -I ${VARNISHAPI_DATAROOTDIR}/aclocal

SUBDIRS = src

EXTRA_DIST = README.rst

dist_man_MANS = vmod_urlcode.3
MAINTAINERCLEANFILES = $(dist_man_MANS)

vmod_urlcode.3: README.rst
if HAVE_RST2MAN
${RST2MAN} README.rst $@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
dist_doc_DATA = README.rst LICENSE
13 changes: 11 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ 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
aclocal -I m4 -I ${dataroot}/aclocal
$LIBTOOLIZE --copy --force
autoheader
automake --add-missing --copy --foreign
Expand Down
65 changes: 28 additions & 37 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,51 +1,42 @@
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2011 Varnish Software AS])
AC_INIT([libvmod-urlcode], [master])
AC_PREREQ([2.63])
AC_INIT([libvmod-urlcode], [0.1], [], [vmod-urlcode])
AC_COPYRIGHT([Copyright (c) 2011-2016 Varnish Software AS])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR(src/vmod_urlcode.vcc)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER([config.h])

AC_CANONICAL_SYSTEM
AC_LANG(C)
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign parallel-tests])
AM_SILENT_RULES([yes])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

AM_INIT_AUTOMAKE([foreign])
LT_PREREQ([2.2.6])
LT_INIT([dlopen disable-static])

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
AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])

AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"

# 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"])
AC_ARG_WITH([rst2man],
AS_HELP_STRING(
[--with-rst2man=PATH],
[Location of rst2man (auto)]),
[RST2MAN="$withval"],
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], []))

# Check for pkg-config
PKG_PROG_PKG_CONFIG
m4_ifndef([VARNISH_PREREQ], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/stdlib.h])
VARNISH_PREREQ([4.1], [trunk])
VARNISH_VMODS([urlcode])

# Check for python
AC_CHECK_PROGS(PYTHON, [python3 python3.1 python3.2 python2.7 python2.6 python2.5 python2 python], [AC_MSG_ERROR([Python is needed to build this vmod, please install python.])])
VMOD_TESTS="$(cd $srcdir/src && echo tests/*.vtc)"
AC_SUBST(VMOD_TESTS)

# Varnish include files tree
VARNISH_VMOD_INCLUDES
VARNISH_VMOD_DIR
VARNISH_VMODTOOL

AC_PATH_PROG([VARNISHTEST], [varnishtest])
AC_PATH_PROG([VARNISHD], [varnishd])
PKG_CHECK_VAR([LIBVARNISHAPI_LIBDIR], [varnishapi], [libdir])
AC_SUBST([VARNISH_LIBRARY_PATH],
[$LIBVARNISHAPI_LIBDIR:$LIBVARNISHAPI_LIBDIR/varnish])

AC_CONFIG_FILES([
Makefile
Expand Down
Empty file removed m4/PLACEHOLDER
Empty file.
Loading