Skip to content

Instantly share code, notes, and snippets.

@Sp1l
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sp1l/e3c709e870285c2cacc6 to your computer and use it in GitHub Desktop.
Save Sp1l/e3c709e870285c2cacc6 to your computer and use it in GitHub Desktop.
Checking for LibreSSL with autotools
### Pass LDFLAGS and CPPFLAGS to configure using CONFIGURE_ENV
.if ${WITH_OPENSSL_PORT}
CONFIGURE_ENV+= CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
.endif
### In configure.ac
AC_CHECK_LIB(crypto, RAND_egd, AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
### In c
#ifdef HAVE_OPENSSL_RAND
bla
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment