diff --git a/configure.ac b/configure.ac index 52ab850f5..7d8e6dda1 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,10 @@ AC_CONFIG_MACRO_DIR([m4]) dnl checks for header files AC_HEADER_STDC AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h) +# for src/conv.c +AC_FUNC_ALLOCA +AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""]) +AC_SUBST(LIBRARY_DL) AC_PATH_PROG(DOXYGEN,doxygen,false) AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false) diff --git a/src/Makefile.am b/src/Makefile.am index 6c0398bc0..25da356ac 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,7 +19,7 @@ libosmocore_la_SOURCES = timer.c select.c signal.c msgb.c bits.c \ if ENABLE_PLUGIN libosmocore_la_SOURCES += plugin.c -libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) -ldl +libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) $(LIBRARY_DL) else libosmocore_la_LDFLAGS = -version-info $(LIBVERSION) endif diff --git a/src/conv.c b/src/conv.c index f47d75cdd..0416d2721 100644 --- a/src/conv.c +++ b/src/conv.c @@ -29,8 +29,10 @@ /*! \file conv.c * \file Osmocom convolutional encoder and decoder */ - +#include "config.h" +#ifdef HAVE_ALLOCA_H #include +#endif #include #include #include diff --git a/src/socket.c b/src/socket.c index 1a1d71dc5..8a8829b75 100644 --- a/src/socket.c +++ b/src/socket.c @@ -18,6 +18,8 @@ #include #include +#include + #include #include #include