Changeset ce27cc1


Ignore:
Timestamp:
Sep 14, 2009, 11:35:39 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
b3a77b1
Parents:
d7cc50b
git-author:
Anders Kaseorg <andersk@mit.edu> (09/14/09 21:20:51)
git-committer:
Anders Kaseorg <andersk@mit.edu> (09/14/09 23:35:39)
Message:
configure.ac: Reimplement -fstack-protector check with AX_C_CHECK_FLAG.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    rd7cc50b rce27cc1  
    5050
    5151AS_IF([test "x$with_stack_protector" != xno],
    52   [
    53     SAVE_CFLAGS=$CFLAGS
    54     CFLAGS="$CFLAGS -fstack-protector"
    55     AC_MSG_CHECKING(whether protection cflags work)
    56     AC_COMPILE_IFELSE(int i;,
    57         [AC_MSG_RESULT(yes)],
    58         [AC_MSG_RESULT(no)
    59         CFLAGS=$SAVE_CFLAGS
    60         if test "x$with_stack_protector" != xcheck; then
    61           AC_MSG_FAILURE([--with-stack-protector selected, but gcc does support it.])
    62         fi])
    63     AC_CHECK_LIB(ssp, __stack_chk_guard)
    64   ])
     52  [AX_C_CHECK_FLAG([-fstack-protector],[],[],
     53    [CFLAGS="$CFLAGS -fstack-protector"],
     54    [if test "x$with_stack_protector" != xcheck; then
     55       AC_MSG_FAILURE([--with-stack-protector selected, but gcc does support it.])
     56     fi
     57    ])])
    6558
    6659AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
Note: See TracChangeset for help on using the changeset viewer.