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 (k@eca.cx)
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/config.h.in ecasound-1.8.5d15.port/config.h.in
> 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/configure.in ecasound-1.8.5d15.port/configure.in

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
CVS-tree:

--cut--
dnl ---
dnl Set up some operating system specific options for POSIX threads
dnl ---
case "$host" in
        *-*-openbsd*)
               CFLAGS="$CFLAGS -pthread"
               CXXFLAGS="$CXXFLAGS -pthread"
               echo "Setting OpenBSD compilation options for POSIX threads"
               ;;
        *-*-freebsd*)
               CFLAGS="$CFLAGS -pthread"
               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
               CXXFLAGS="$CXXFLAGS -pthread"
               echo "Setting FreeBSD compilation options for POSIX threads"
               ;;
        *-*-solaris*)
               CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
               echo "Setting Solaris compilation options for POSIX threads"
               ;;
        *)
               echo "Using generic settings for POSIX thread support."
               ;;
esac

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

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

> > AC_CHECK_FUNCS(mlockall)

Applied.

> [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>

Applied.

> [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

Applied.

-- 
 . http://www.eca.cx ... [ audio software for linux ] /\ . 
 . http://www.eca.cx/sculpscape [ my armchair-tunes mp3/ra/wav ]

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request@wakkanet.fi>.


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