Module: xenomai-3
Branch: next
Commit: 2ab509f672d64ab1c2d9d8fa0a592b440bc29852
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=2ab509f672d64ab1c2d9d8fa0a592b440bc29852

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Feb 20 09:55:50 2015 +0100

build: auto-detect fortify support in libc unconditionally

---

 configure    |    8 +++-----
 configure.ac |   12 +++++-------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index ea63a7a..b187729 100755
--- a/configure
+++ b/configure
@@ -14256,19 +14256,17 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_fortify:-autodetect}" 
>&5
 $as_echo "${want_fortify:-autodetect}" >&6; }
-if test x"$want_fortify" != xno; then
-   ac_fn_c_check_func "$LINENO" "__vfprintf_chk" "ac_cv_func___vfprintf_chk"
+ac_fn_c_check_func "$LINENO" "__vfprintf_chk" "ac_cv_func___vfprintf_chk"
 if test "x$ac_cv_func___vfprintf_chk" = xyes; then :
 
 $as_echo "#define CONFIG_XENO_FORTIFY 1" >>confdefs.h
 
 else
   if test x"$want_fortify" = "xyes"; then
-             as_fn_error $? "Fortify support enabled but not available in 
*libc" "$LINENO" 5
-              fi
+      as_fn_error $? "Fortify support enabled but not available in *libc" 
"$LINENO" 5
+      fi
 fi
 
-fi
 
 XENO_USER_APP_CFLAGS="-D_GNU_SOURCE -D_REENTRANT"
 XENO_USER_APP_LDFLAGS=
diff --git a/configure.ac b/configure.ac
index 429e7d5..79c121e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -678,13 +678,11 @@ AC_ARG_ENABLE([fortify],
              *) want_fortify=no;;
              esac])
 AC_MSG_RESULT(${want_fortify:-autodetect})
-if test x"$want_fortify" != xno; then
-   AC_CHECK_FUNC(__vfprintf_chk,
-             [AC_DEFINE(CONFIG_XENO_FORTIFY, 1,[config])],
-             [if test x"$want_fortify" = "xyes"; then
-             AC_MSG_ERROR([Fortify support enabled but not available in *libc])
-              fi])
-fi
+AC_CHECK_FUNC(__vfprintf_chk,
+      [AC_DEFINE(CONFIG_XENO_FORTIFY, 1,[config])],
+      [if test x"$want_fortify" = "xyes"; then
+      AC_MSG_ERROR([Fortify support enabled but not available in *libc])
+      fi])
 
 dnl Exported CFLAGS and LDFLAGS, shared with internal flags
 XENO_USER_APP_CFLAGS="-D_GNU_SOURCE -D_REENTRANT"


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to