Fix several configure --enable options
This commit is contained in:
parent
a6397a0d62
commit
5fd44f138b
26
configure.ac
26
configure.ac
|
@ -56,19 +56,17 @@ fi
|
||||||
#
|
#
|
||||||
# enable creation of man pages
|
# enable creation of man pages
|
||||||
#
|
#
|
||||||
enable_man=no
|
|
||||||
AC_ARG_ENABLE([man],
|
AC_ARG_ENABLE([man],
|
||||||
[AC_HELP_STRING([--enable-man], [generate man pages [default=auto]])],
|
[AC_HELP_STRING([--enable-man], [generate man pages [default=auto]])],
|
||||||
[
|
[
|
||||||
if test "$enableval" = yes; then
|
if test "$enable_man" = yes; then
|
||||||
enable_man=yes
|
|
||||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||||
AS_IF([test -z "$XSLTPROC"], [
|
AS_IF([test -z "$XSLTPROC"], [
|
||||||
AC_MSG_ERROR([xsltproc is required for --enable-man])
|
AC_MSG_ERROR([xsltproc is required for --enable-man])
|
||||||
enable_man="no (xsltproc not found)"
|
enable_man="no (xsltproc not found)"
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
])
|
], [ enable_man=no ])
|
||||||
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man = xyes)
|
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man = xyes)
|
||||||
|
|
||||||
# src/psl-make-dafsa needs python 2.7+
|
# src/psl-make-dafsa needs python 2.7+
|
||||||
|
@ -76,12 +74,10 @@ AM_PATH_PYTHON([2.7])
|
||||||
|
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
cfi=no
|
|
||||||
AC_ARG_ENABLE([cfi],
|
AC_ARG_ENABLE([cfi],
|
||||||
[AS_HELP_STRING([--enable-cfi], [Turn on clang's Control Flow Integrity (CFI)])],
|
[AS_HELP_STRING([--enable-cfi], [Turn on clang's Control Flow Integrity (CFI)])],
|
||||||
[
|
[
|
||||||
if test "$enableval" = yes; then
|
if test "$enable_cfi" = yes; then
|
||||||
cfi=yes
|
|
||||||
CFLAGS=$CFLAGS" -B/usr/bin/gold -fsanitize=cfi -flto -fvisibility=default -fno-sanitize-trap=all"
|
CFLAGS=$CFLAGS" -B/usr/bin/gold -fsanitize=cfi -flto -fvisibility=default -fno-sanitize-trap=all"
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
AC_LANG_PROGRAM([], [])
|
AC_LANG_PROGRAM([], [])
|
||||||
|
@ -89,28 +85,24 @@ AC_ARG_ENABLE([cfi],
|
||||||
AC_MSG_ERROR([clang 3.7+ and the 'gold' linker are required for --enable-cfi])
|
AC_MSG_ERROR([clang 3.7+ and the 'gold' linker are required for --enable-cfi])
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
])
|
], [ enable_cfi=no ])
|
||||||
|
|
||||||
ubsan=no
|
|
||||||
AC_ARG_ENABLE([ubsan],
|
AC_ARG_ENABLE([ubsan],
|
||||||
[AS_HELP_STRING([--enable-ubsan], [Turn on Undefined Behavior Sanitizer (UBSan)])],
|
[AS_HELP_STRING([--enable-ubsan], [Turn on Undefined Behavior Sanitizer (UBSan)])],
|
||||||
[
|
[
|
||||||
if test "$enableval" = yes; then
|
if test "$enable_ubsan" = yes; then
|
||||||
ubsan=yes
|
|
||||||
CFLAGS=$CFLAGS" -fsanitize=undefined -fno-sanitize-recover=undefined"
|
CFLAGS=$CFLAGS" -fsanitize=undefined -fno-sanitize-recover=undefined"
|
||||||
fi
|
fi
|
||||||
])
|
], [ enable_ubsan=no ])
|
||||||
|
|
||||||
asan=no
|
|
||||||
AC_ARG_ENABLE([asan],
|
AC_ARG_ENABLE([asan],
|
||||||
[AS_HELP_STRING([--enable-asan], [Turn on Address Sanitizer (ASan)])],
|
[AS_HELP_STRING([--enable-asan], [Turn on Address Sanitizer (ASan)])],
|
||||||
[
|
[
|
||||||
if test "$enableval" = yes; then
|
if test "$enable_asan" = yes; then
|
||||||
asan=yes
|
|
||||||
CFLAGS=$CFLAGS" -fsanitize=address -fno-omit-frame-pointer"
|
CFLAGS=$CFLAGS" -fsanitize=address -fno-omit-frame-pointer"
|
||||||
AX_CHECK_COMPILE_FLAG([-fsanitize-address-use-after-scope], [CFLAGS="$CFLAGS -fsanitize-address-use-after-scope"])
|
AX_CHECK_COMPILE_FLAG([-fsanitize-address-use-after-scope], [CFLAGS="$CFLAGS -fsanitize-address-use-after-scope"])
|
||||||
fi
|
fi
|
||||||
])
|
], [ enable_asan=no ])
|
||||||
|
|
||||||
# Define these substitions here to keep all version information in one place.
|
# Define these substitions here to keep all version information in one place.
|
||||||
# For information on how to properly maintain the library version information,
|
# For information on how to properly maintain the library version information,
|
||||||
|
@ -401,7 +393,7 @@ AC_MSG_NOTICE([Summary of build options:
|
||||||
PSL Dist File: ${PSL_DISTFILE}
|
PSL Dist File: ${PSL_DISTFILE}
|
||||||
PSL File: ${PSL_FILE}
|
PSL File: ${PSL_FILE}
|
||||||
PSL Test File: ${PSL_TESTFILE}
|
PSL Test File: ${PSL_TESTFILE}
|
||||||
Sanitizers: UBSan $ubsan, ASan $asan, CFI $cfi
|
Sanitizers: UBSan $enable_ubsan, ASan $enable_asan, CFI $enable_cfi
|
||||||
Docs: $enable_gtk_doc
|
Docs: $enable_gtk_doc
|
||||||
Man pages: $enable_man
|
Man pages: $enable_man
|
||||||
Tests: ${TESTS_INFO}
|
Tests: ${TESTS_INFO}
|
||||||
|
|
Loading…
Reference in New Issue