-AC_SUBST(DOCDIR)
-AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
-#endif SILC_DIST_AUTODIST
-
-#ifdef SILC_DIST_COMPILER
-##
-## With/without checkings
-##
-
-#
-# SILC library checking
-compile_libs=true
-LIBSUBDIR=lib
-
-#ifndef SILC_DIST_TOOLKIT
-AC_ARG_WITH(silc-includes,
- [ --with-silc-includes=DIR SILC Toolkit includes [search in DIR]],
- [ac_silc_includes="$withval"], [ac_silc_includes="no"])
-AC_ARG_WITH(silc-libs,
- [ --with-silc-libs=DIR SILC Toolkit libraries [search in DIR]],
- [ac_silc_libs="$withval"], [ac_silc_libs="no"])
-
-if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
-
- # Manually provided libs
- if test "$ac_silc_includes" != "no"; then
- compile_libs=false
- SILC_LIB_INCLUDES="-I$ac_silc_includes"
- LIBSUBDIR=
- fi
- if test "$ac_silc_libs" != "no"; then
- compile_libs=false
- LIBSUBDIR=
- LIBS="$LIBS -L$ac_silc_libs"
- fi
-
- # Check libs to link against
- f=`$EGREP __SILC_HAVE_PTHREAD $ac_silc_includes/silc.h`
- if test -n "$f"; then
- LIBS="$LIBS -lpthread"
- check_threads=false
- has_threads=true
- fi
- f=`$EGREP __SILC_HAVE_SIM $ac_silc_includes/silc.h`
- if test -n "$f"; then
- LIBS="$LIBS -ldl"
- fi
-
-else
- # pkg-config check
- PKG_CHECK_MODULES(SILC, silc, compile_libs=false, compile_libs=true)
-#ifdef SILC_DIST_CLIENTLIB
- PKG_CHECK_MODULES(SILCCLIENT, silcclient, compile_libs=false, compile_libs=true)
-#endif SILC_DIST_CLIENTLIB
-#ifdef SILC_DIST_SERVERLIB
- PKG_CHECK_MODULES(SILCSERVER, silcserver, compile_libs=false, compile_libs=true)
-#endif SILC_DIST_SERVERLIB
-
- if test x$compile_libs = xfalse; then
- LIBSUBDIR=
- LIBS="$LIBS $SILC_LIBS"
- CFLAGS="$CFLAGS $SILC_CFLAGS"
-#ifdef SILC_DIST_CLIENTLIB
- LIBS="$LIBS $SILCCLIENT_LIBS"
- CFLAGS="$CFLAGS $SILCCLIENT_CFLAGS"
-#endif SILC_DIST_CLIENTLIB
-#ifdef SILC_DIST_SERVERLIB
- LIBS="$LIBS $SILCSERVER_LIBS"
- CFLAGS="$CFLAGS $SILCSERVER_CFLAGS"
-#endif SILC_DIST_SERVERLIB
- fi
-fi
-#endif SILC_DIST_TOOLKIT
-
-AC_SUBST(LIBSUBDIR)