summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in1
-rw-r--r--src/Makefile.am4
2 files changed, 3 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 9b38d417b..f0c0e10c5 100644
--- a/configure.in
+++ b/configure.in
@@ -10,6 +10,7 @@ AC_PROG_INSTALL
AC_PROG_RANLIB
dnl checks for libraries
+AC_SEARCH_LIBS(crypt, crypt, [LIBCRYPT="-lcrypt";AC_DEFINE(VTY_CRYPT_PW)])
dnl checks for header files
AC_HEADER_STDC
diff --git a/src/Makefile.am b/src/Makefile.am
index afa63cc51..7fd7049fe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,7 +14,7 @@ libbsc_a_SOURCES = abis_rsl.c abis_nm.c gsm_04_08.c gsm_data.c \
libvty_a_SOURCES = vty/buffer.c vty/command.c vty/vector.c vty/vty.c
bsc_hack_SOURCES = bsc_hack.c vty_interface.c
-bsc_hack_LDADD = libbsc.a libvty.a -ldl -ldbi
+bsc_hack_LDADD = libbsc.a libvty.a -ldl -ldbi $(LIBCRYPT)
bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c msgb.c debug.c \
select.c timer.c rs232.c tlv_parser.c signal.c
@@ -22,4 +22,4 @@ bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c msgb.c debug.c \
ipaccess_find_SOURCES = ipaccess-find.c select.c timer.c
ipaccess_config_SOURCES = ipaccess-config.c
-ipaccess_config_LDADD = libbsc.a libvty.a -ldl -ldbi
+ipaccess_config_LDADD = libbsc.a libvty.a -ldl -ldbi $(LIBCRYPT)