diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-04-10 08:55:41 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-04-10 09:55:27 +0200 |
commit | 57555c75a8faf71bc7d664d73a2b9914ddb809d0 (patch) | |
tree | 69ef7906240427ee77d9a3f0d0cec7fc04098982 /m4 | |
parent | 6ceb3b0e0836f08ede425fd58ff93f322b881636 (diff) | |
download | gnutls-57555c75a8faf71bc7d664d73a2b9914ddb809d0.tar.gz |
Added support for x86 intel AES instruction acceleration if detected.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gcc.m4 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/m4/gcc.m4 b/m4/gcc.m4 new file mode 100644 index 0000000000..ad40adac7e --- /dev/null +++ b/m4/gcc.m4 @@ -0,0 +1,28 @@ +# gcc.m4 serial 2 +dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Based on code by Simon Josefsson + +# GCC_FLAG_ADD(PARAMETER, [ACTION]) +# ------------------------------------------------ +# Adds parameter to CFLAGS if the compiler supports it. For example, +# GCC_FLAG_ADD([-maes], [VAR]). +AC_DEFUN([GCC_FLAG_ADD], +[AS_VAR_PUSHDEF([GCC_FLAG], [gl_cv_GCC_FLAG_$1])dnl +AC_CACHE_CHECK([whether compiler handles $1], [GCC_FLAG], [ + save_CFLAGS="$CFLAGS" + CFLAGS="${CFLAGS} $1" + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])], + [AS_VAR_SET([GCC_FLAG], [yes])], + [AS_VAR_SET([GCC_FLAG], [no])]) + CFLAGS="$save_CFLAGS" +]) +AS_VAR_IF([GCC_FLAG], [yes], [ +m4_ifval([$2], [AC_SUBST([$2],[yes])]) +CFLAGS="${CFLAGS} $1" +])dnl +AS_VAR_POPDEF([GCC_FLAG]) +]) |