1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-16 06:15:24 +00:00

minor update for uncommon cases

svn path=/icecast/trunk/m4/; revision=14776
This commit is contained in:
Karl Heyes 2008-04-19 01:54:11 +00:00
parent 0047edd51c
commit 492da8a239
4 changed files with 30 additions and 15 deletions

View File

@ -57,6 +57,7 @@ acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -m
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
@ -66,13 +67,13 @@ case "${host_cpu}-${host_os}" in
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthreads pthread -mt $acx_pthread_flags"
acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
;;
esac
@ -146,14 +147,14 @@ if test "x$acx_pthread_ok" = xyes; then
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
[attr_name=$attr; break])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
@ -166,13 +167,17 @@ if test "x$acx_pthread_ok" = xyes; then
if test "x$flag" != xno; then
PTHREAD_CPPFLAGS="$flag $PTHREAD_CPPFLAGS"
fi
AC_CHECK_TYPES(pthread_rwlock_t,,,[#include <pthread.h>])
AC_CHECK_FUNCS([pthread_spin_lock])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
# More AIX lossage: must compile with xlc_r or cc_r
if test x"$GCC" != xyes; then
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
else
PTHREAD_CC=$CC
fi
else
PTHREAD_CC="$CC"
fi

View File

@ -58,16 +58,17 @@ AC_TRY_LINK_FUNC(ogg_stream_init, [xt_lib_vorbis=ok],
)
])
AC_MSG_RESULT([$xt_lib_vorbis])
if test "x$xt_lib_vorbis" = "xok"; then
#
# Now check if the installed Vorbis is sufficiently new.
#
AC_CHECK_TYPES([struct ovectl_ratemanage_arg],,
[xt_lib_vorbis="old version found"], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <vorbis/codec.h>
#include <vorbis/vorbisenc.h>
])
], [
struct ovectl_ratemanage_arg a;
])],,[xt_lib_vorbis="old version found"])
AC_MSG_RESULT([$xt_lib_vorbis])
fi
CPPFLAGS="$xt_save_CPPFLAGS"
LIBS="$xt_save_LIBS"

View File

@ -178,9 +178,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[const char *x = __func__;])],
[ AH_TEMPLATE([__func__], [Replace __func__ if not supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[const char *x = __FUNCTION__;])],
[ AC_DEFINE([__func__],[__FUNCTION__])
AC_MSG_RESULT([yes])],
[ AC_DEFINE([__func__],[""])
AC_MSG_RESULT([no])
AC_MSG_RESULT([Using __FUNCTION__])],
[ AC_DEFINE([__func__],["__FILE__"])
AC_MSG_RESULT([using __FILE__])
])
])
])dnl XIPH_C__FUNC__

View File

@ -9,7 +9,13 @@ dnl Get the cflags and libraries
dnl
AC_ARG_WITH(curl,
AC_HELP_STRING([--with-curl=PFX],[Prefix where libcurl is installed (optional)]),
curl_prefix="$withval", curl_prefix="")
curl_prefix="$withval", curl_prefix="$CURL_PREFIX")
if test "x$curl_prefix" = "xno"
then
AC_MSG_RESULT([libcurl support disabled by request])
else
AC_ARG_WITH(curl-config,
AC_HELP_STRING([--with-curl-config=curl-config],[Use curl-config to find libcurl]),
CURL_CONFIG="$withval", [AC_PATH_PROGS(CURL_CONFIG, [curl-config], "")])
@ -66,4 +72,7 @@ else
fi
CPPFLAGS="$xt_curl_CPPFLAGS"
LIBS="$xt_curl_LIBS"
fi
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
])