Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-backend_dyn
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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-backend_dyn
Commits
a53aaa86
Commit
a53aaa86
authored
Jun 25, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of old boilerplate in configure.ac, and enforce -Wextra -std=c99
parent
fd77c8ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
83 deletions
+20
-83
configure.ac
configure.ac
+19
-82
Makefile.am
src/Makefile.am
+1
-1
No files found.
configure.ac
View file @
a53aaa86
AC_PREREQ(2.59)
AC_COPYRIGHT([Copyright (c) 2015 UPLEX Nils Goroll Systemoptimierung])
AC_INIT([libvmod-backend_dyn], [trunk])
AC_INIT([VMOD backend_dyn], [trunk], [varnish-support@uplex.de],
[libvmod-backend_dyn],
[https://code.uplex.de/uplex-varnish/libvmod-gcrypt])
AC_CONFIG_MACRO_DIR([m4])
m4_ifndef([VARNISH_VMOD_INCLUDES], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))
m4_ifndef([VARNISH_VMOD_INCLUDES],
AC_MSG_ERROR([Need varnish.m4 -- see INSTALL.rst]))
AC_CONFIG_SRCDIR(src/vmod.vcc)
AM_CONFIG_HEADER(config.h)
...
...
@@ -74,60 +77,6 @@ AC_PATH_PROG([VARNISHTEST], [varnishtest], [],
AC_PATH_PROG([VARNISHD], [varnishd], [],
[$LIBVARNISHAPI_SBINDIR:$LIBVARNISHAPI_BINDIR:$PATH])
##
## --enable-developer-warnings, --enable-stack-protector and
## --enable-debugging-symbols from Varnish 4.1 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 is a test to see how much havoc Jenkins exposes.
#
# The reason for -Wno-error=unused-result is a glibc/gcc interaction
# idiocy where write is marked as warn_unused_result, causing build
# failures.
CFLAGS="${CFLAGS} -Wall -Werror"
OCFLAGS="${OCFLAGS} -Wall -Werror"
AX_CHECK_COMPILE_FLAG([-Werror=unused-result],
[CFLAGS="${CFLAGS} -Wno-error=unused-result"
OCFLAGS="${OCFLAGS} -Wno-error=unused-result"],
[AX_CHECK_COMPILE_FLAG([-Wunused-result],
[CFLAGS="${CFLAGS} -Wno-unused-result"
OCFLAGS="${OCFLAGS} -Wno-unused-result"])])
# This corresponds to FreeBSD's WARNS level 6
DEVELOPER_CFLAGS=" \
-Werror \
-Wall \
-Wno-format-y2k \
-W \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Wpointer-arith \
-Wreturn-type \
-Wcast-qual \
-Wwrite-strings \
-Wswitch \
-Wshadow \
-Wunused-parameter \
-Wcast-align \
-Wchar-subscripts \
-Wnested-externs \
-Wextra \
-Wno-sign-compare \
"
# These are not compliable yet
DEVELOPER_GCC_CFLAGS="-Wold-style-definition -Wredundant-decls "
#DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} ${DEVELOPER_GCC_CFLAGS}"
# These are compilable
DEVELOPER_CLANG_CFLAGS="-Wmissing-variable-declarations -Wno-string-plus-int"
# -Wno-empty-body
#DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} ${DEVELOPER_CLANG_CFLAGS}"
# --enable-stack-protector
AC_ARG_ENABLE(stack-protector,
AS_HELP_STRING([--enable-stack-protector],[enable stack protector (default is YES)]),
...
...
@@ -141,36 +90,24 @@ if test "x$enable_stack_protector" != "xno"; then
[], [])
fi
# --enable-de
veloper-warnings
AC_ARG_ENABLE(de
veloper-warnings
,
AS_HELP_STRING([--enable-de
veloper-warnings],[enable strict warnings
(default is NO)]),
# --enable-de
bugging
AC_ARG_ENABLE(de
bugging
,
AS_HELP_STRING([--enable-de
bugging],[enable debugging
(default is NO)]),
[],
[enable_developer_warnings=no])
if test "x$enable_developer_warnings" != "xno"; then
# compiler flags not available on gcc3
AX_CHECK_COMPILE_FLAG([-Wno-pointer-sign],
[DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wno-pointer-sign"], [], [])
# Not available in gcc 4.1.2
AX_CHECK_COMPILE_FLAG([-Wno-address],
[DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wno-address"])
# no known way to specifically disabling missing-field-initializers warnings
# keeping the rest of Wextra
AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers],
[DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wno-missing-field-initializers"],
[DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -Wno-extra"],
[enable_debugging=no])
# AC_PROG_CC sets CFLAGS to '-g -O2' unless it is already set, so
# there's no need to add -g. Disable or change by explicitly setting
# CFLAGS. If this option is enabled, then -Og or -O0 becomes the last
# optimization option, and hence takes precedence.
if test "x$enable_debugging" != "xno"; then
CFLAGS="${CFLAGS} -fno-inline"
AX_CHECK_COMPILE_FLAG([-Og],
[CFLAGS="${CFLAGS} -Og"],
[CFLAGS="${CFLAGS} -O0"],
[])
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
OCFLAGS="${OCFLAGS} ${DEVELOPER_CFLAGS}"
fi
# --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")
AC_CONFIG_FILES([
Makefile
src/Makefile
...
...
src/Makefile.am
View file @
a53aaa86
AM_CPPFLAGS
=
@VMOD_INCLUDES@
-Wall
-Werror
AM_CPPFLAGS
=
@VMOD_INCLUDES@
-Wall
-Werror
-Wextra
-std
=
c99
vmoddir
=
@VMOD_DIR@
vmod_LTLIBRARIES
=
libvmod_backend_dyn.la
...
...
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