[xiph-commits] r14776 - icecast/trunk/m4
karl at svn.xiph.org
karl at svn.xiph.org
Fri Apr 18 18:54:12 PDT 2008
Author: karl
Date: 2008-04-18 18:54:11 -0700 (Fri, 18 Apr 2008)
New Revision: 14776
Modified:
icecast/trunk/m4/acx_pthread.m4
icecast/trunk/m4/vorbis.m4
icecast/trunk/m4/xiph_compiler.m4
icecast/trunk/m4/xiph_curl.m4
Log:
minor update for uncommon cases
Modified: icecast/trunk/m4/acx_pthread.m4
===================================================================
--- icecast/trunk/m4/acx_pthread.m4 2008-04-18 21:08:40 UTC (rev 14775)
+++ icecast/trunk/m4/acx_pthread.m4 2008-04-19 01:54:11 UTC (rev 14776)
@@ -57,6 +57,7 @@
# -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 @@
# 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 @@
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$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
Modified: icecast/trunk/m4/vorbis.m4
===================================================================
--- icecast/trunk/m4/vorbis.m4 2008-04-18 21:08:40 UTC (rev 14775)
+++ icecast/trunk/m4/vorbis.m4 2008-04-19 01:54:11 UTC (rev 14776)
@@ -58,16 +58,17 @@
)
])
-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"
Modified: icecast/trunk/m4/xiph_compiler.m4
===================================================================
--- icecast/trunk/m4/xiph_compiler.m4 2008-04-18 21:08:40 UTC (rev 14775)
+++ icecast/trunk/m4/xiph_compiler.m4 2008-04-19 01:54:11 UTC (rev 14776)
@@ -178,9 +178,9 @@
[ 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__
Modified: icecast/trunk/m4/xiph_curl.m4
===================================================================
--- icecast/trunk/m4/xiph_curl.m4 2008-04-18 21:08:40 UTC (rev 14775)
+++ icecast/trunk/m4/xiph_curl.m4 2008-04-19 01:54:11 UTC (rev 14776)
@@ -9,7 +9,13 @@
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 @@
fi
CPPFLAGS="$xt_curl_CPPFLAGS"
LIBS="$xt_curl_LIBS"
+fi
+AC_SUBST(CURL_CFLAGS)
+AC_SUBST(CURL_LIBS)
])
More information about the commits
mailing list