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
c1f70aef
Commit
c1f70aef
authored
Nov 07, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add configure options for developers from Varnish 4.1
parent
c44be0db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
0 deletions
+97
-0
configure.ac
configure.ac
+97
-0
No files found.
configure.ac
View file @
c1f70aef
...
...
@@ -72,6 +72,103 @@ 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)]),
[],
[enable_stack_protector=yes])
if test "x$enable_stack_protector" != "xno"; then
AX_CHECK_COMPILE_FLAG([-fstack-protector],
AX_CHECK_LINK_FLAG([-fstack-protector],
[DEVELOPER_CFLAGS="${DEVELOPER_CFLAGS} -fstack-protector"], [], []),
[], [])
fi
# --enable-developer-warnings
AC_ARG_ENABLE(developer-warnings,
AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (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"],
[])
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
...
...
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