Skip to content

Commit

Permalink
Merge pull request #12 from davide-scola/0.x-disable_x86_checks_on_no…
Browse files Browse the repository at this point in the history
…n_x86_architectures

[0.x] Better x86 checks
  • Loading branch information
davide-scola authored Feb 28, 2018
2 parents e0d674f + da1f1c0 commit 7660674
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ grc-keygen
grenache-get
grenache-put
grenache-keygen
grenache-lookup

#
# Distribution
Expand Down
30 changes: 26 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ dnl implied. See the License for the specific language governing permissions
dnl and limitations under the License.

AC_PREREQ(2.69)
AC_INIT([grenache-cli], [0.4.0], [[email protected]])
AC_INIT([grenache-cli], [0.4.1], [[email protected]])

AC_SUBST([VERSION], [0.4.0])
AC_SUBST([VERSION], [0.4.1])
AC_SUBST([SB], [`$srcdir/shtool echo -n -e %B`])
AC_SUBST([EB], [`$srcdir/shtool echo -n -e %b`])

Expand All @@ -36,7 +36,7 @@ AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([include/io.h])
AC_CONFIG_HEADERS([config.h])

AC_CANONICAL_SYSTEM
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz])

AX_IS_RELEASE([git-directory])
Expand Down Expand Up @@ -123,7 +123,6 @@ AX_C99_INLINE
AX_GCC_FUNC_ATTRIBUTE([always_inline])
AX_COMPILER_FLAGS
AX_GCC_ARCHFLAG
AX_ENABLE_X86_FEATURES

dnl --------------------------------------------------------------------
dnl Checks for library functions.
Expand All @@ -143,6 +142,29 @@ dnl Checks for user defined options.
dnl --------------------------------------------------------------------
AX_MSG_BOLD([Checking user defined options])

AC_ARG_ENABLE([x86-features], AC_HELP_STRING([--enable-x86-features],
[Enable the x86 features check @<:@default=yes@:>@]),
[ax_cv_enable_x86_features="${enableval}"], [ax_cv_enable_x86_features='yes'])

AC_MSG_CHECKING([whether you want to enable the x86 features check])

if test "x${ax_cv_enable_x86_features}" = 'xyes'; then
AC_MSG_RESULT([yes])

case "${target}" in
i?86-* | amd64-* | x86_64-*)
AX_CHECK_X86_FEATURES
;;
*)
ax_cv_enable_x86_features='no'
AC_MSG_WARN([the x86 features check cannot be performed])
;;
esac
else
AC_MSG_RESULT([no])
ax_cv_enable_x86_features='no'
fi

AX_DEFINE_DESCRIPTOR([SKEY_FILENO], [secret key], [6])
AX_DEFINE_DESCRIPTOR([PKEY_FILENO], [public key], [7])
AX_DEFINE_DESCRIPTOR([SIGN_FILENO], [signature], [8])
Expand Down
3 changes: 1 addition & 2 deletions m4/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ ax_gcc_x86_cpuid.m4 \
ax_compiler_vendor.m4 \
ax_gcc_archflag.m4 \
ax_gcc_x86_cpu_supports.m4 \
ax_check_x86_features.m4 \
ax_enable_x86_features.m4
ax_check_x86_features.m4

MAINTAINERCLEANFILES = \
libtool.m4 \
Expand Down
26 changes: 0 additions & 26 deletions m4/ax_enable_x86_features.m4

This file was deleted.

0 comments on commit 7660674

Please sign in to comment.