summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac38
1 files changed, 27 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 805b78bc7..aaab48aef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -286,6 +286,9 @@ AC_PATH_PROG([PATCH], [patch], :)
AC_PATH_PROG([SED], [sed], :)
AC_PATH_PROG([NM], [nm], :)
+DOWNLOAD=":"
+DOWNLOAD_TO_STDOUT=
+DOWNLOAD_TIMEOUT=
if test "${WGET}" != ":" ; then
DOWNLOAD=${WGET}
DOWNLOAD_TO_STDOUT="${WGET} -q -O-"
@@ -295,13 +298,14 @@ else if test "${CURL}" != ":" ; then
DOWNLOAD_TO_STDOUT="${CURL} -Ls"
DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)'
else
- AC_PATH_PROG([FETCH], [fetch], [:])
- DOWNLOAD=${FETCH}
- DOWNLOAD_TO_STDOUT="${FETCH} -o-"
- DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
+ AC_PATH_PROG([FETCH], [fetch], :)
+ if test "${FETCH}" != ":" ; then
+ DOWNLOAD=${FETCH}
+ DOWNLOAD_TO_STDOUT="${FETCH} -o-"
+ DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
+ fi
fi
fi
-
AC_SUBST(DOWNLOAD)
AC_SUBST(DOWNLOAD_TO_STDOUT)
AC_SUBST(DOWNLOAD_TIMEOUT)
@@ -1460,6 +1464,23 @@ AC_LINK_IFELSE(
)
LIBS=${old_LIBS}
+# re-check without -ldl
+# Non-Linux platforms like FreeBSD and NetBSD do not need a library libdl.so.
+if test "${PBX_DLADDR}" = "0"; then
+ AC_MSG_CHECKING(for dladdr in dlfcn.h without -ldl)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([#define _GNU_SOURCE 1
+#include <dlfcn.h>],
+ [dladdr((void *)0, (void *)0)]
+ )],
+ AC_MSG_RESULT(yes)
+ PBX_DLADDR=1
+ AC_SUBST([PBX_DLADDR])
+ AC_DEFINE([HAVE_DLADDR], 1, [Define to 1 if your system has the dladdr() GNU extension]),
+ AC_MSG_RESULT(no)
+ )
+fi
+
# PKGCONFIG is used in later tests
PKG_PROG_PKG_CONFIG()
@@ -2567,12 +2588,7 @@ fi
AST_EXT_LIB_CHECK([TONEZONE], [tonezone], [tone_zone_find], [dahdi/tonezone.h], [${tonezone_extra} ${DAHDI_INCLUDE}])
-if test "${OSARCH}" = "OpenBSD";
-then
- AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -lvorbisfile -logg])
-else
- AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -lvorbisfile])
-fi
+AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -lvorbisfile])
AST_C_DECLARE_CHECK([VORBIS_OPEN_CALLBACKS], [OV_CALLBACKS_NOCLOSE], [vorbis/vorbisfile.h])
AC_LANG_PUSH(C++)