Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotools configure.ac and Makefile.am #61

Open
noloader opened this issue Jun 24, 2020 · 0 comments
Open

Autotools configure.ac and Makefile.am #61

noloader opened this issue Jun 24, 2020 · 0 comments

Comments

@noloader
Copy link
Contributor

noloader commented Jun 24, 2020

Hi Everyone/Samuel,

PR #64 has configure.ac and Makefile.am for Autotools. The BLAKE2 project is free to rip them. They were placed in public domain.

I found it easier to use Autotools rather than patching the makefiles and sources. Distros like Debian and Fedora should enjoy it, too. Autotools makes it very easy for a distro to uptake the project.

To use the files, unpack the zip file in the root of the BLAKE2 release directory. The root of the BLAKE2 release directory will have b2sum/, bench/ and friends below it. Then run:

$ autoreconf --install --force
$ ./configure
$ make
$ make check
$ make install

There's a configure option for regular users (non-distro users): --enable-native. It attempts to find the best compiler options for the native platform. On x86_64 it would be -march=native. On arm it would be -march=armv7 -mfpu=neon if available (which it usually is). It is off-by-default so distros don't accidentally distribute files built for the wrong arch (i.e., SSE4 or AVX on x86_64).

The SSE sources are used when appropriate. That currently includes i686 and x86_64. NEON sources are also used when appropriate.

Configure produces three or four artifacts:

  • b2sum
  • blake2-genkat-c
  • blake2-genkat-json
  • blake2-bench (x86 and x64 only)

The self tests are built and run during make check but they are not installed. For installation, the self tests would need to be wired-up to find their KATs in $ORIGIN/../share/b2sum/testvectors/. That has not happened.

You can create a folder like contrib/autotools, and drop them in the directory. You could also drop the CMake files into the contrib/cmake folder. Add a README that says things in contrib/ are not officially supported.

This was referenced Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant