summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-09-07 09:50:44 +0200
committerWerner Koch <wk@gnupg.org>2013-09-07 10:16:45 +0200
commit49d5b9dcd622cdc87fb02a211bd51e3d46345bf2 (patch)
tree540fc2d1b63b378d17834cb893a23c6c56043724 /configure.ac
parent4d8c8c7aa88cddb1624301957e6245405f46d027 (diff)
downloadlibgcrypt-49d5b9dcd622cdc87fb02a211bd51e3d46345bf2.tar.gz
Add configure option --disable-amd64-as-feature-detection.
* configure.ac: Implement new disable flag. -- Doing a static build of Libgcrypt currently throws an as error on my box. Adding this configure option as a workaround Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 14 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 993577b7..8deb4481 100644
--- a/configure.ac
+++ b/configure.ac
@@ -613,6 +613,14 @@ AC_ARG_ENABLE([O-flag-munging],
AC_MSG_RESULT($enable_o_flag_munging)
AM_CONDITIONAL(ENABLE_O_FLAG_MUNGING, test "$enable_o_flag_munging" = "yes")
+# Implementation of the --disable-amd64-as-feature-detection switch.
+AC_MSG_CHECKING([whether to enable AMD64 as(1) feature detection])
+AC_ARG_ENABLE(amd64-as-feature-detection,
+ AC_HELP_STRING([--disable-amd64-as-feature-detection],
+ [Disable the auto-detection of AMD64 as(1) features]),
+ amd64_as_feature_detection=$enableval,
+ amd64_as_feature_detection=yes)
+AC_MSG_RESULT($amd64_as_feature_detection)
AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
@@ -964,7 +972,8 @@ fi
# Check whether GCC assembler supports features needed for our amd64
# implementations
#
-AC_CACHE_CHECK([whether GCC assembler is compatible for amd64 assembly implementations],
+if test $amd64_as_feature_detection = yes; then
+ AC_CACHE_CHECK([whether GCC assembler is compatible for amd64 assembly implementations],
[gcry_cv_gcc_amd64_platform_as_ok],
[gcry_cv_gcc_amd64_platform_as_ok=no
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
@@ -984,9 +993,10 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for amd64 assembly implement
".type asmfunc,@function;\n\t"
);]])],
[gcry_cv_gcc_amd64_platform_as_ok=yes])])
-if test "$gcry_cv_gcc_amd64_platform_as_ok" = "yes" ; then
- AC_DEFINE(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS,1,
- [Defined if underlying assembler is compatible with amd64 assembly implementations])
+ if test "$gcry_cv_gcc_amd64_platform_as_ok" = "yes" ; then
+ AC_DEFINE(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS,1,
+ [Defined if underlying assembler is compatible with amd64 assembly implementations])
+ fi
fi