Skip to content

Instantly share code, notes, and snippets.

@tonidy
Forked from mcandre/homebrew-install-mkpasswd.md
Last active August 30, 2021 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tonidy/6676834c5434998d5a37200e39a533ed to your computer and use it in GitHub Desktop.
Save tonidy/6676834c5434998d5a37200e39a533ed to your computer and use it in GitHub Desktop.
Homebrew install mkpasswd
brew tap tonidy/tools-tap
brew install mkpasswd
diff --git a/Makefile b/Makefile
index da93d4c..d0559f9 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,8 @@ else ifdef HAVE_LIBOWCRYPT
# owl and openSUSE have crypt_gensalt(3) in libowcrypt
DEFS += -DHAVE_CRYPT_H -DHAVE_LINUX_CRYPT_GENSALT -D_OW_SOURCE
mkpasswd_LDADD += -lcrypt -lowcrypt
+else ifeq ($(shell $(PKG_CONFIG) --exists 'libcrypto' || echo NO),)
+mkpasswd_LDADD += $(shell $(PKG_CONFIG) --libs libcrypto)
else
mkpasswd_LDADD += -lcrypt
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment