diff options
author | 2019-01-02 09:59:48 -0800 | |
---|---|---|
committer | 2019-03-29 09:59:04 -0700 | |
commit | 7626b75b3c71173ba62c2f92d22bab8f4291e44a (patch) | |
tree | 7308a2628a014fef0f245ef4f00408cf92d15e60 /SoftHSMv2/m4/acx_64bit.m4 | |
parent | f2ff7a136a152b36b3aa4d0d574796e6edbef24a (diff) |
Update SoftHSM v2.0 to the latest version
Change-Id: Ib3ec2c297f897c82776a66fe2ad55b18984c0337
Issue-ID: AAF-687
Signed-off-by: Pramod Raghavendra Jayathirth <pramod.raghavendra.jayathirth@intel.com>
Diffstat (limited to 'SoftHSMv2/m4/acx_64bit.m4')
-rw-r--r-- | SoftHSMv2/m4/acx_64bit.m4 | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/SoftHSMv2/m4/acx_64bit.m4 b/SoftHSMv2/m4/acx_64bit.m4 index f610b21..4620184 100644 --- a/SoftHSMv2/m4/acx_64bit.m4 +++ b/SoftHSMv2/m4/acx_64bit.m4 @@ -7,23 +7,42 @@ AC_DEFUN([ACX_64BIT],[ if test "x$enable_64bit" = "xyes" then - AC_MSG_CHECKING(if we can compile in 64-bit mode) tmp_CFLAGS=$CFLAGS CFLAGS="-m64" - AC_RUN_IFELSE( - [ + AC_CACHE_CHECK([if we can compile in 64-bit mode], [acx_cv_prog_cc_64bit],[ + acx_cv_prog_cc_64bit=no + AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([],[return sizeof(void*) == 8 ? 0 : 1;]) ], [ - AC_MSG_RESULT(yes) - CXXFLAGS="-m64 $CXXFLAGS" - LDFLAGS="-m64 $LDFLAGS" - CFLAGS="-m64 $tmp_CFLAGS" - ],[ - AC_MSG_RESULT(no) - AC_MSG_ERROR([Don't know how to compile in 64-bit mode.]) - CFLAGS=$tmp_CFLAGS - ] - ) + acx_cv_prog_cc_64bit=yes + ]) + ]) + + if test "x$acx_cv_prog_cc_64bit" = xyes; then + AC_MSG_CHECKING([if we can run 64-bit programs]) + AC_CACHE_VAL([acx_cv_sys_64bit],[ + acx_cv_sys_64bit=no + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([],[return sizeof(void*) == 8 ? 0 : 1;]) + ], [ + AC_MSG_RESULT(yes) + acx_cv_sys_64bit=yes + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([Don't know how to compile in 64-bit mode.]) + CFLAGS=$tmp_CFLAGS + ],[ + AC_MSG_WARN([Cannot test, assuming 64-bit]) + acx_cv_sys_64bit=yes + ]) + ]) + + CXXFLAGS="-m64 $CXXFLAGS" + LDFLAGS="-m64 $LDFLAGS" + CFLAGS="-m64 $tmp_CFLAGS" + else + CFLAGS=$tmp_CFLAGS + fi fi ]) |