+##
+## Required dependencies
+##
+
+compile_libs=true
+LIBSUBDIR=lib
+LDFLAGS="-L\$(silc_top_srcdir)/lib $LDFLAGS"
+
+# SILC Runtime Toolkit checking
+AC_ARG_WITH(srt-includes,
+ [ --with-srt-includes=DIR SILC Runtime Toolkit includes [search in DIR]],
+ [ac_srt_includes="$withval"], [ac_srt_includes="no"])
+AC_ARG_WITH(srt-libs,
+ [ --with-srt-libs=DIR SILC Runtime Toolkit libraries [search in DIR]],
+ [ac_srt_libs="$withval"], [ac_srt_libs="no"])
+
+if test -n "$with_srt_includes" || test -n "$with_srt_libs"; then
+ # Manually provided libs
+ if test "$ac_srt_includes" != "no"; then
+ SILC_LIB_INCLUDES="-I$ac_srt_includes"
+ fi
+ if test "$ac_srt_libs" != "no"; then
+ LDFLAGS="-L$ac_srt_libs $LDFLAGS"
+ fi
+
+ # Check libs to link against
+ f=`$EGREP __SILC_HAVE_PTHREAD $ac_srt_includes/silc.h`
+ if test -n "$f"; then
+ LIBS="$LIBS -lpthread"
+ has_threads=true
+ fi
+else
+ # pkg-config check
+ PKG_CHECK_MODULES(SRT, [srt >= 1.2])
+ LIBS="$SRT_LIBS $LIBS"
+ CFLAGS="$CFLAGS $SRT_CFLAGS"
+fi
+
+# SILC Crypto Toolkit checking
+AC_ARG_WITH(sct-includes,
+ [ --with-sct-includes=DIR SILC Crypto Toolkit includes [search in DIR]],
+ [ac_sct_includes="$withval"], [ac_sct_includes="no"])
+AC_ARG_WITH(sct-libs,
+ [ --with-sct-libs=DIR SILC Crypto Toolkit libraries [search in DIR]],
+ [ac_sct_libs="$withval"], [ac_sct_libs="no"])
+
+if test -n "$with_sct_includes" || test -n "$with_sct_libs"; then
+ # Manually provided libs
+ if test "$ac_sct_includes" != "no"; then
+ SILC_LIB_INCLUDES="-I$ac_sct_includes"
+ fi
+ if test "$ac_sct_libs" != "no"; then
+ LDFLAGS="-L$ac_sct_libs $LDFLAGS"
+ fi
+
+ # Check libs to link against
+ f=`$EGREP __SILC_HAVE_PTHREAD $ac_sct_includes/silc.h`
+ if test -n "$f"; then
+ LIBS="$LIBS -lpthread"
+ has_threads=true
+ fi
+else
+ # pkg-config check
+ PKG_CHECK_MODULES(SCT, [sct >= 1.2])
+ LIBS="$SCT_LIBS $LIBS"
+ CFLAGS="$CFLAGS $SCT_CFLAGS"
+fi
+
+