From 5d222134f9029462d61e2f8b3674a86561641f32 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sat, 25 Oct 2008 16:41:37 +0000 Subject: Only link against -lcrypt on Linux & BSD systems. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@707861 13f79535-47bb-0310-9956-ffa450edef68 --- bin/Makefile.am | 3 ++- configure.ac | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/Makefile.am b/bin/Makefile.am index 7b226e63..2d685e42 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -15,7 +15,8 @@ noinst_SCRIPTS = couchjs_dev bin_PROGRAMS = couchpw couchpw_SOURCES = couchpw.c -couchpw_LDADD = -lcrypt + +couchpw_LDADD = $(LIBS) if HELP2MAN dist_man1_MANS = couchdb.1 couchjs.1 diff --git a/configure.ac b/configure.ac index 020e6c39..2e2a3361 100644 --- a/configure.ac +++ b/configure.ac @@ -108,6 +108,12 @@ AC_CHECK_CURL(7.16.0) AC_SUBST(CURL_CFLAGS) AC_SUBST(CURL_LIBS) +case "$(uname -s)" in + Linux | *BSD) + LIBS="$LIBS -lcrypt" + ;; +esac + AC_PATH_PROG([ERL], [erl]) if test x${ERL} = x; then -- cgit v1.2.3