Prepare for hardware feature detection on other platforms.
authorWerner Koch <wk@gnupg.org>
Fri, 21 Dec 2012 16:26:06 +0000 (17:26 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 21 Dec 2012 16:26:06 +0000 (17:26 +0100)
commit09ac5d87d11aa0b1fa0e0a4184ab03b3671a73e2
treefdd126ae4b5c2fa2624edac0052619a70c207c1e
parentd842eea55e22c05da3959a7a4422b5fcd7884f60
Prepare for hardware feature detection on other platforms.

* configure.ac (GCRYPT_HWF_MODULES): New.
(HAVE_CPU_ARCH_X86, HAVE_CPU_ARCH_ALPHA, HAVE_CPU_ARCH_SPARC)
(HAVE_CPU_ARCH_MIPS, HAVE_CPU_ARCH_M68K, HAVE_CPU_ARCH_PPC)
(HAVE_CPU_ARCH_ARM): New AC_DEFINEs.
* mpi/config.links (mpi_cpu_arch): New.
* src/global.c (print_config): Print new tag "cpu-arch".
* src/Makefile.am (libgcrypt_la_SOURCES): Add hwf-common.h
(EXTRA_libgcrypt_la_SOURCES): New.
(gcrypt_hwf_modules): New.
(libgcrypt_la_DEPENDENCIES, libgcrypt_la_LIBADD): Add that one.
* src/hwfeatures.c: Factor most code out to ...
* src/hwf-x86.c: New file.
(detect_x86_gnuc): Return the feature vector.
(_gcry_hwf_detect_x86): New.
* src/hwf-common.h: New.
* src/hwfeatures.c (_gcry_detect_hw_features): Dispatch using
HAVE_CPU_ARCH_ macros.

Signed-off-by: Werner Koch <wk@gnupg.org>
configure.ac
mpi/config.links
src/Makefile.am
src/global.c
src/hwf-common.h [new file with mode: 0644]
src/hwf-x86.c [new file with mode: 0644]
src/hwfeatures.c