summaryrefslogtreecommitdiffstats
path: root/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m448
1 files changed, 32 insertions, 16 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index a2e59a6..b1c75d3 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -409,7 +409,7 @@ x_includes=NONE
x_libraries=NONE
DESTDIR=
SH_ENABLE_OPTS="selinux posix-acl asm ssp db-reload xml-log message-queue login-watch process-check port-check mounts-check logfile-monitor userfiles debug ptrace static network udp nocl stealth micro-stealth install-name identity khide suidcheck base largefile mail external-scripts encrypt srp dnmalloc ipv6 shellexpand suid"
-SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver kcheck gpg keyid checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
+SH_WITH_OPTS="prelude libprelude-prefix database libwrap cflags libs console altconsole timeserver alttimeserver rnd egd-socket port logserver altlogserver signify pubkey-checksum gpg keyid checksum fp recipient sender trusted tmp-dir config-file log-file pid-file state-dir data-file html-file"
# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
@@ -1124,30 +1124,45 @@ AC_DEFUN([GCC_STACK_PROTECT_LIB],[
AC_DEFUN([GCC_STACK_PROTECT_CC],[
AC_LANG_ASSERT(C)
if test "X$CC" != "X"; then
- AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-all],
+ AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-strong],
ssp_cv_cc,
[ssp_old_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-protector-all"
+ CFLAGS="$CFLAGS -fstack-protector-strong"
AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
CFLAGS="$ssp_old_cflags"
])
if test $ssp_cv_cc = no; then
- AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector],
+ AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-all],
ssp_cv_cc,
[ssp_old_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-protector"
+ CFLAGS="$CFLAGS -fstack-protector-all"
AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
CFLAGS="$ssp_old_cflags"
])
- if test $ssp_cv_cc = yes; then
- CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector"
- LDFLAGS="$LDFLAGS -fstack-protector"
- AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
+ if test $ssp_cv_cc = no; then
+ AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector],
+ ssp_cv_cc,
+ [ssp_old_cflags="$CFLAGS"
+ CFLAGS="$CFLAGS -fstack-protector"
+ AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
+ CFLAGS="$ssp_old_cflags"
+ ])
+ if test $ssp_cv_cc = yes; then
+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector"
+ LDFLAGS="$LDFLAGS -fstack-protector"
+ AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
+ fi
+ else
+ if test $ssp_cv_cc = yes; then
+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
+ LDFLAGS="$LDFLAGS -fstack-protector-all"
+ AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
+ fi
fi
else
if test $ssp_cv_cc = yes; then
- CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
- LDFLAGS="$LDFLAGS -fstack-protector-all"
+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-strong"
+ LDFLAGS="$LDFLAGS -fstack-protector-strong"
AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
fi
fi
@@ -1210,15 +1225,15 @@ AC_DEFUN([GCC_PIE_CC],[
AC_DEFUN([GCC_STACK_CHECK_CC],[
AC_LANG_ASSERT(C)
if test "X$CC" != "X"; then
- AC_CACHE_CHECK([whether ${CC} accepts -fstack-check],
+ AC_CACHE_CHECK([whether ${CC} accepts -fstack-clash-protection],
stackcheck_cv_cc,
[stackcheck_old_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-check"
+ CFLAGS="$CFLAGS -fstack-clash-protection"
AC_TRY_COMPILE(,, stackcheck_cv_cc=yes, stackcheck_cv_cc=no)
CFLAGS="$stackcheck_old_cflags"
])
if test $stackcheck_cv_cc = yes; then
- CFLAGS="$CFLAGS -fstack-check"
+ CFLAGS="$CFLAGS -fstack-clash-protection"
fi
fi
])
@@ -1228,10 +1243,11 @@ AC_DEFUN([GCC_FLAG_CHECK],[
if test "X$CC" != "X"; then
AC_MSG_CHECKING([whether ${CC} accepts $1])
saved_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -Werror $1"
+ # any -Wno- option will always succeed :-(
+ flag_check_opt=`echo $1 | sed 's,-Wno-,-W,'`
+ CFLAGS="$CFLAGS -Werror $flag_check_opt"
AC_TRY_COMPILE(,, flag_check_cv=yes, flag_check_cv=no)
CFLAGS="$saved_cflags"
-
if test $flag_check_cv = yes; then
CFLAGS="$CFLAGS $1"
AC_MSG_RESULT([yes])