Daily bump.
[gcc.git] / libssp / configure.ac
index 9e4a22a24d47e9b8467ffa2dc45b445d5e636f45..f30f81c54f620d1810186928f10feeb9b3e9808d 100644 (file)
@@ -2,7 +2,6 @@
 # 
 # aclocal -I .. -I ../config && autoconf && autoheader && automake
 
-AC_PREREQ(2.64)
 AC_INIT(libssp, 1.0)
 AC_CONFIG_SRCDIR(ssp.c)
 AC_CANONICAL_SYSTEM
@@ -62,6 +61,11 @@ void __attribute__((noinline)) bar (char *x)
 [AC_MSG_RESULT(no)])
 CFLAGS="$save_CFLAGS"
 
+# Add CET specific flags if CET is enabled
+GCC_CET_FLAGS(CET_FLAGS)
+XCFLAGS="$XCFLAGS $CET_FLAGS"
+AC_SUBST(XCFLAGS)
+
 AC_MSG_CHECKING([whether hidden visibility is supported])
 AC_TRY_COMPILE([
 void __attribute__((visibility ("hidden"))) bar (void) {}],,
@@ -126,7 +130,7 @@ else
 fi
 
 AC_MSG_CHECKING([whether vsnprintf is usable])
-AC_RUN_IFELSE(AC_LANG_PROGRAM([
+AC_RUN_IFELSE([AC_LANG_PROGRAM([
 #include <stdarg.h>
 #include <string.h>
 #include <stdio.h>
@@ -142,7 +146,7 @@ int foo (char *buf, size_t n, const char *fmt, ...)
 [char buf@<:@8@:>@; memset (buf, 'A', sizeof (buf));
  if (foo (buf, 4, ".%s.", "CDEFG") != 7)
    return 1;
- return memcmp (buf, ".CD\0AAAA", sizeof (buf)) != 0;]),
+ return memcmp (buf, ".CD\0AAAA", sizeof (buf)) != 0;])],
 [ssp_have_usable_vsnprintf=define],
 [ssp_have_usable_vsnprintf=undef],
 [ssp_have_usable_vsnprintf=undef])
@@ -159,6 +163,8 @@ ACX_LT_HOST_FLAGS
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 
+GCC_WITH_TOOLEXECLIBDIR
+
 # Calculate toolexeclibdir
 # Also toolexecdir, though it's only used in toolexeclibdir
 case ${version_specific_libs} in
@@ -174,7 +180,14 @@ case ${version_specific_libs} in
        test x"$with_cross_host" != x"no"; then
       # Install a library built with a cross compiler in tooldir, not libdir.
       toolexecdir='$(exec_prefix)/$(target_alias)'
-      toolexeclibdir='$(toolexecdir)/lib'
+      case ${with_toolexeclibdir} in
+       no)
+         toolexeclibdir='$(toolexecdir)/lib'
+         ;;
+       *)
+         toolexeclibdir=${with_toolexeclibdir}
+         ;;
+      esac
     else
       toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
       toolexeclibdir='$(libdir)'