Re: [ecasound] (SOLVED!) Ported ecasound to FreeBSD 4.2

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] (SOLVED!) Ported ecasound to FreeBSD 4.2
From: Kai Vehmanen (
Date: Wed Jan 17 2001 - 03:44:33 EET

On Wed, 20 Dec 2000, Anarcat wrote:

> software on FreeBSD. I will make an official "port" and (implicitly)
> "package" of ecasound for FreeBSD as soon as I find the time.

Ok, great! Let's see the current patches..

> diff -r ecasound-1.8.5d15/ ecasound-1.8.5d15.port/
> 54a55,57
> > /* Define if you have the mlockall function. */
> > #undef HAVE_MLOCKALL

Applied as is.

> [New patch over pthread recognition process, also check for mlockall function]
> diff -r ecasound-1.8.5d15/ ecasound-1.8.5d15.port/

I'm not sure whether I should apply the whole thing (especially parts
concerning OpenBSD and Solaris). Hmm, I put the following in ecasound's

dnl ---
dnl Set up some operating system specific options for POSIX threads
dnl ---
case "$host" in
               CFLAGS="$CFLAGS -pthread"
               CXXFLAGS="$CXXFLAGS -pthread"
               echo "Setting OpenBSD compilation options for POSIX threads"
               CFLAGS="$CFLAGS -pthread"
               CXXFLAGS="$CXXFLAGS -pthread"
               echo "Setting FreeBSD compilation options for POSIX threads"
               echo "Setting Solaris compilation options for POSIX threads"
               echo "Using generic settings for POSIX thread support."

AC_SEARCH_LIBS(pthread_create, pthread c_r, [],
                AC_MSG_ERROR([** POSIX.4 threads not installed or broken **]))

This should handle all known variants (well, not AIX, but that's another
thing). This is the only thread-related part in the current

> > AC_CHECK_FUNCS(mlockall)


> [this is a personal "style" patch made from a warning from gcc
> (something like "return from double to long int"). The thing is that
> the function returns a long int but a division is "casted" to a
> diff -r ecasound-1.8.5d15/libecasound/eca-chainsetup-position.cpp ecasound-1.8.5d15.port/libecasound/eca-chainsetup-position.cpp
> 46c46
> < return(static_cast<double>(length_rep) / srate_rep);
> ---
> > return(static_cast<long int>(length_rep) / srate_rep);

Uhm, actually not even a style issue, but a needed fix. As both
'length_rep' and 'srate_rep' are long integers, no casting is in fact
needed. Applied.

> [conforming to POSIX]
> diff -r ecasound-1.8.5d15/libecasound/eca-object-map.cpp ecasound-1.8.5d15.port/libecasound/eca-object-map.cpp
> 22a23
> > #include <sys/types.h>


> [adaptation to missing mlockall() on certain systems (notably FreeBSD)]
> diff -r ecasound-1.8.5d15/libecasound/eca-session.cpp ecasound-1.8.5d15.port/libecasound/eca-session.cpp


 . ... [ audio software for linux ] /\ . 
 . [ my armchair-tunes mp3/ra/wav ]

-- To unsubscribe send message 'unsubscribe' in the body of the message to <>.

New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jan 17 2001 - 04:00:51 EET