From: Lubomir Sedlacik Date: Fri, 23 Aug 2002 05:10:52 +0000 (+0000) Subject: search for ldopen in -lc, this enables SIM support on *BSD systems. X-Git-Tag: silc.client.0.9.5~27 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=a8a760a986b79213d3a54a38453b983f5be4fe78 search for ldopen in -lc, this enables SIM support on *BSD systems. based on patch from Alex Zepeda. --- diff --git a/configure.in.pre b/configure.in.pre index dd91ea9b..6ec1997e 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -121,17 +121,25 @@ AC_CHECK_FUNCS(pthread_create nl_langinfo) # XXX These needs to be changed as more supported platforms appear. # XXX This probably needs to be made platform dependant check. sim_support=false -AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue) AC_CHECKING(for SIM support) -AC_CHECK_HEADERS(dlfcn.h, - AC_CHECK_LIB(dl, dlopen, - AC_DEFINE(SILC_SIM) +AC_CHECK_HEADERS(dlfcn.h, + AC_CHECK_LIB(dl, dlopen, + AC_DEFINE(SILC_SIM) sim_support=true - AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue) - AC_MSG_RESULT(enabled SIM support) LIBS="$LIBS -ldl", - AC_MSG_RESULT(no SIM support found)), - AC_MSG_RESULT(no SIM support found)) + [AC_CHECK_LIB(c, dlopen, + AC_DEFINE(SILC_SIM) + sim_support=true + ])) +) + +AM_CONDITIONAL(SILC_SIM, test x$sim_support = xtrue) +if test x$sim_support = xtrue; then + AC_MSG_RESULT(enabled SIM support) +else + AC_MSG_RESULT(no SIM support found) +fi + # # lib/contrib conditionals @@ -280,7 +288,7 @@ AC_ARG_WITH(socks4, ;; esac ], AC_MSG_RESULT(no) -) +) # SOCKS5 support checking AC_MSG_CHECKING(whether to support SOCKS5) @@ -303,7 +311,7 @@ AC_ARG_WITH(socks5, withval="-L$withval/lib -lsocks5" else withval="-L$withval -lsocks5" - fi + fi LIBS="$withval $LIBS" @@ -314,7 +322,7 @@ AC_ARG_WITH(socks5, ;; esac ], AC_MSG_RESULT(no) -) +) if test "x$socks" = "x4"; then AC_DEFINE(SOCKS) @@ -429,7 +437,7 @@ AC_ARG_WITH(win32, [ --with-win32 Compile native WIN32 code (-mno-cygwin)], [ AC_DEFINE(SILC_WIN32) win32_support=true - CFLAGS="-mno-cygwin $CFLAGS" + CFLAGS="-mno-cygwin $CFLAGS" LIBS="$LIBS -lwsock32" ]) AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue) @@ -455,7 +463,7 @@ AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue) without_irssi=false AC_ARG_WITH(irssi, [ --without-irssi Compile without Irssi SILC Client], -[ without_irssi=true +[ without_irssi=true SILC_DIST_SUBDIRS=`echo $SILC_DIST_SUBDIRS | $sedpath -e 's/irssi//'` ]) @@ -476,7 +484,7 @@ AC_MSG_CHECKING(for IPv6 support) AC_ARG_ENABLE(ipv6, [ --enable-ipv6 Enable IPv6 support], [ case "${enableval}" in - yes) + yes) want_ipv6=true check_ipv6=false AC_DEFINE(HAVE_IPV6) @@ -513,7 +521,7 @@ AC_MSG_CHECKING(for enabled debugging) AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging], [ case "${enableval}" in - yes) + yes) AC_MSG_RESULT(yes) AC_DEFINE(SILC_DEBUG) CFLAGS="-O -g $CFLAGS" @@ -529,7 +537,7 @@ AC_MSG_CHECKING(for enabled stack tracing) AC_ARG_ENABLE(stack-trace, [ --enable-stack-trace Enable memory stack trace], [ case "${enableval}" in - yes) + yes) AC_MSG_RESULT(yes) AC_DEFINE(SILC_STACKTRACE) ;; @@ -563,8 +571,8 @@ esac ]) if test x$check_threads = xtrue; then want_threads=false -AC_CHECK_HEADERS(pthread.h, - [ AC_DEFINE(SILC_HAVE_PTHREAD) +AC_CHECK_HEADERS(pthread.h, + [ AC_DEFINE(SILC_HAVE_PTHREAD) want_threads=true ], [ if test -f /usr/pkg/include/pthread.h ; then AC_DEFINE(SILC_HAVE_PTHREAD) @@ -585,7 +593,7 @@ if test x$want_threads = xtrue; then TMP_LIBS="$LIBS" LIBS="-lpthread" AC_TRY_LINK([#include ], - [pthread_attr_t attr; pthread_attr_init(&attr);], + [pthread_attr_t attr; pthread_attr_init(&attr);], AC_DEFINE(SILC_THREADS), LIBS="-L/usr/pkg/lib -lpthread" AC_TRY_LINK([#include ], @@ -593,7 +601,7 @@ if test x$want_threads = xtrue; then AC_DEFINE(SILC_THREADS), LIBS="-L/usr/contrib/lib -lpthread" AC_TRY_LINK([#include ], - [pthread_attr_t attr; pthread_attr_init(&attr);], + [pthread_attr_t attr; pthread_attr_init(&attr);], AC_DEFINE(SILC_THREADS), LIBS="" ))) @@ -603,7 +611,7 @@ if test x$want_threads = xtrue; then *-aix*) CFLAGS="$CFLAGS -D_THREAD_SAFE" if test x"$GCC" = xyes; then - CFLAGS="$CFLAGS -mthreads" + CFLAGS="$CFLAGS -mthreads" fi ;; *-freebsd2.2*) @@ -628,7 +636,7 @@ fi # Other configure scripts # if test x$without_irssi = xfalse; then - if test "x$silc_dist" = "xsilc-client" || + if test "x$silc_dist" = "xsilc-client" || test "x$silc_dist" = "xsilc-toolkit"; then AC_CONFIG_SUBDIRS(irssi) fi @@ -649,16 +657,16 @@ AC_SUBST(SILC_DIST_SUBDIRS) # # Makefile outputs # -AC_CONFIG_FILES( \ +AC_CONFIG_FILES( Makefile Makefile.defines Makefile.defines_int -doc/Makefile +doc/Makefile includes/Makefile lib/Makefile lib/contrib/Makefile lib/silccore/Makefile -lib/silccrypt/Makefile +lib/silccrypt/Makefile lib/silcmath/Makefile lib/silcmath/mpi/Makefile.defines lib/silcmath/mpi/Makefile.defines_int @@ -675,15 +683,15 @@ lib/silcsftp/tests/Makefile doc/example_silcd.conf ) -if test "x$silc_dist" = "xsilc-client" || +if test "x$silc_dist" = "xsilc-client" || test "x$silc_dist" = "xsilc-toolkit"; then AC_CONFIG_FILES(lib/silcclient/Makefile) fi if test x$without_irssi = xfalse ; then -if test "x$silc_dist" = "xsilc-client" || +if test "x$silc_dist" = "xsilc-client" || test "x$silc_dist" = "xsilc-toolkit"; then -AC_CONFIG_FILES( \ +AC_CONFIG_FILES( irssi/Makefile.defines irssi/Makefile.defines_int ) @@ -693,14 +701,14 @@ fi if test x$without_silcd = xfalse ; then if test "x$silc_dist" = "xsilc-server" || test "x$silc_dist" = "xsilc-toolkit"; then -AC_CONFIG_FILES( \ +AC_CONFIG_FILES( silcd/Makefile ) fi fi if test "x$silc_dist" = "xsilc-toolkit"; then -AC_CONFIG_FILES( \ +AC_CONFIG_FILES( silc/Makefile win32/Makefile win32/libsilc/Makefile