Hi, some observations:
- the configure.in script is broken for jack support. Also the gcc -mtune options is obviously not supported by all gcc versions/platforms (use -march instead). A fixed configure.in is attached (i can't check in at the moment, would someone please do for me?)
- with --enable-simd (on P4) the FFT examples like pvoc are silent, although the normal test tone patch is working as expected. Enabling/disabling FFTW support has no effect on that.
- the threaded soundfiler can't launch its thread when pd is started as "pd -rt" as a normal user.
- "pd -alsa" is always crashing (segmentation fault) when selecting devices in the user dialog.
best greetings, Thomas
dnl Process this file with autoconf to produce a configure script. AC_INIT(d_arithmetic.c)
AC_SUBST(binarymode, -m755) AC_SUBST(MORECFLAGS) AC_SUBST(EXT) AC_SUBST(DEFS) AC_SUBST(OPT_CFLAGS) AC_SUBST(SYSSRC) AC_SUBST(STRIPFLAG) AC_SUBST(GUINAME) AC_SUBST(GUIFLAGS) AC_SUBST(OSNUMBER) AC_SUBST(EXTERNTARGET) AC_SUBST(CC) AC_SUBST(PDLIB)
dnl other defaults AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_CPP
dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME
dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h bstring.h)
dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL AC_FUNC_VPRINTF AC_CHECK_FUNCS(gettimeofday select socket strerror)
dnl Checks for libraries. AC_CHECK_LIB(dl, dlopen, , echo "dynamic link support required" || exit 1) AC_CHECK_LIB(m, sin, , echo "math library required" || exit 1)
AC_CHECK_LIB(pthread, pthread_create, , echo "pthreads required" || exit 1)
dnl check for features AC_ARG_ENABLE(alsa, [ --disable-alsa disable ALSA], alsa="no", alsa="yes")
AC_ARG_ENABLE(jack, [ --enable-jack jack audio server], jack=$enableval, jack=no)
AC_ARG_ENABLE(portaudio, [ --enable-portaudio portaudio], portaudio=$enableval,portaudio=no)
AC_ARG_ENABLE(debug, [ --enable-debug debugging support], USE_DEBUG=$enableval,USE_DEBUG=no)
AC_ARG_ENABLE(static, [ --enable-static link statically], LDFLAGS="$LDFLAGS -static")
AC_ARG_ENABLE(setuid, [ --enable-setuid install as setuid (linux)], setuid=yes)
AC_ARG_ENABLE(fftw, [ --enable-fftw fftw3 support], AC_CHECK_LIB(fftw3f,fftwf_plan_dft_r2c_1d))
AC_ARG_ENABLE(icc, [ --enable-icc icc support], CC=icc; icc=yes)
AC_ARG_ENABLE(optimize, [ --enable-optimize enables optimized builds for: pentium4, pentium3, G4, G5], optimize=$enableval, MORECFLAGS=$MORECFLAGS" -DDONTUSESIMD")
AC_ARG_ENABLE(simd, [ --enable-simd use SIMD code (default=no)], simdcode=$enableval, MORECFLAGS=$MORECFLAGS" -DDONTUSESIMD")
AC_ARG_ENABLE(threadedgui, [ --enable-threadedgui use yves degoyon's threaded gui patch], MORECFLAGS=$MORECFLAGS" -DTHREADED_GUI")
AC_ARG_ENABLE(threadedsf, [ --enable-threadedsf use threaded soundfiler], MORECFLAGS=$MORECFLAGS" -DTHREADED_SF -DGARRAY_THREAD_LOCK -D_GNU_SOURCE")
AC_ARG_ENABLE(gathreadlocks, [ --enable-gathreadlocks t_garray threadlock], MORECFLAGS=$MORECFLAGS" -DGARRAY_THREAD_LOCK -D_GNU_SOURCE")
dnl Find paths to includes and libraries for X11 AC_PATH_X LIBS="$LIBS -L$x_libraries"
dnl Checking for `XCreateWindow' function in -lX11: AC_CHECK_LIB(X11, XCreateWindow, , echo "no X11 found" || exit 1, -L$x_libraries)
dnl look for tcl 8.x...
tcllib=""
AC_CHECK_LIB(tcl8.7, main,tcllib=tcl8.7, AC_CHECK_LIB(tcl8.6, main,tcllib=tcl8.6, AC_CHECK_LIB(tcl8.5, main,tcllib=tcl8.5, AC_CHECK_LIB(tcl8.4, main,tcllib=tcl8.4, AC_CHECK_LIB(tcl8.3, main,tcllib=tcl8.3, AC_CHECK_LIB(tcl8.2, main,tcllib=tcl8.2, AC_CHECK_LIB(tcl8.0, main,tcllib=tcl8.0,echo no tcl library found || exit 1)))))))
LIBS="$LIBS -l$tcllib" tklib=${tcllib/tcl/tk}
AC_CHECK_LIB($tklib, main,,echo no tk library found || exit 1)
foundit=no AC_CHECK_HEADER(tcl.h,foundit=yes)
if test "$foundit" = "no"; then AC_CHECK_HEADER($tcllib/tcl.h, GUIFLAGS="$GUIFLAGS -I/usr/include/$tcllib", [echo no tcl header found];exit -1) fi
if test x$jack == xyes; then AC_CHECK_LIB(rt,shm_open) AC_CHECK_LIB(jack,jack_set_error_function) AC_CHECK_LIB(jack,jack_set_xrun_callback, MORECFLAGS="$MORECFLAGS -DJACK_XRUN" )
SYSSRC=$SYSSRC" s_audio_jack.c" MORECFLAGS="$MORECFLAGS -DUSEAPI_JACK" PDLIB="$PDLIB -ljack" fi
if test `uname -s` == Linux; then dnl Ckecking for ALSA echo .................... alsa= $alsa dnl This should be fixed so Pd can use ALSA shared libraries where appropriate. if test x$alsa == xyes; then AC_CHECK_LIB(asound,snd_pcm_info,PDLIB="$PDLIB -lasound" ; alsa="yes",alsa="no") fi
dnl Set processor flags if test "$icc" == "yes"; then if test "$optimize" == "pentium4"; then ARCH_CFLAGS="-xN -ip -ipo_obj" fi if test "$optimize" == "pentium3"; then ARCH_CFLAGS="-xK -ip -ipo_obj" fi else if test "$optimize" == "pentium4"; then ARCH_CFLAGS="-march=pentium4 -mmmx -msse -msse2 -mfpmath=sse" fi if test "$optimize" == "pentium3"; then ARCH_CFLAGS="-march=pentium3 -mmmx -msse -mfpmath=sse" fi if test "$optimize" == "pentium2"; then ARCH_CFLAGS="-march=pentium2 -mmmx"; MORECFLAGS=$MORECFLAGS" -DDONTUSESIMD" fi if test "$optimize" == "pentium"; then ARCH_CFLAGS="-march=pentium" MORECFLAGS=$MORECFLAGS" -DDONTUSESIMD" fi fi
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
EXT=pd_linux MORECFLAGS=$MORECFLAGS" -DPA_USE_OSS -DPA_LITTLE_ENDIAN -DUNIX -DUNISTD -DUNIX -DUNISTDo\ -DUSEAPI_OSS \ -I../portaudio/pa_common -I../portaudio/pablio \ -I../portaudio/portmidi-macosx \ -fno-strict-aliasing" SYSSRC=$SYSSRC" s_midi_oss.c s_audio_oss.c" if test x$alsa == "xyes"; then SYSSRC=$SYSSRC" s_audio_alsa.c s_audio_alsamm.c" MORECFLAGS=$MORECFLAGS" -DPA_USE_ALSA -DUSEAPI_ALSA" LDFLAGS=$LDFLAGS" -lasound" fi
if test x$portaudio == "xyes"; then MORECFLAGS=$MORECFLAGS" -DUSEAPI_PORTAUDIO -DPA19"$MORECFLAGS SYSSRC=$SYSSRC" s_audio_pa.c \ s_audio_pablio.c \ s_audio_paring.c \ ../portaudio/pa_common/pa_allocation.c \ ../portaudio/pa_common/pa_converters.c \ ../portaudio/pa_common/pa_cpuload.c \ ../portaudio/pa_common/pa_dither.c \ ../portaudio/pa_common/pa_front.c \ ../portaudio/pa_common/pa_process.c \ ../portaudio/pa_common/pa_skeleton.c \ ../portaudio/pa_common/pa_stream.c \ ../portaudio/pa_common/pa_trace.c \ ../portaudio/pa_unix/pa_unix_hostapis.c \ ../portaudio/pa_unix/pa_unix_util.c \ ../portaudio/pa_unix_oss/pa_unix_oss.c " if test x$alsa == "xyes"; then SYSSRC=$SYSSRC" ../portaudio/pa_linux_alsa/pa_linux_alsa.c" MORECFLAGS=$MORECFLAGS" -Wno-error" fi fi
if test x$setuid == "xyes"; then binarymode="-m4755" fi
STRIPFLAG=-s GUINAME="pd-gui" if test x$USE_DEBUG == "xyes"; then OPT_CFLAGS="-g" else if test "$icc" = "yes"; then OPT_CFLAGS=$ARCH_CFLAGS" -O3" else OPT_CFLAGS=$ARCH_CFLAGS" -O3 -funroll-loops -fomit-frame-pointer" fi fi
dnl we have to add the OPT_CFLAGS to the LD_FLAGS to make sure that icc dnl links with the right libraries - timblechmann@gmx.de if test "$icc" = "yes"; then LDFLAGS=$LDFLAGS" "$OPT_CFLAGS fi
echo OPT_CFLAGS --------------- $OPT_CFLAGS OSNUMBER=0 fi
if test `uname -s` == Darwin; then LDFLAGS=$LDFLAGS" -Wl -framework CoreAudio \ -framework AudioUnit -framework AudioToolbox \ -framework Carbon -framework CoreMIDI" EXT=pd_darwin MORECFLAGS=$MORECFLAGS" -DMACOSX -DUNISTD -I/usr/X11R6/include \ -I../portaudio_v18/pa_common -I../portaudio_v18/pablio \ -I../portmidi_osx \ -Wno-error \ -DUSEAPI_PORTAUDIO -DPA_BIG_ENDIAN" SYSSRC=$SYSSRC" s_midi_pm.c s_audio_pa.c s_audio_pablio.c s_audio_paring.c \ ../portaudio/pa_common/pa_lib.c \ ../portaudio/pa_common/pa_trace.c \ ../portaudio/pa_common/pa_convert.c \ ../portaudio/pa_mac_core/pa_mac_core.c \ ../portmidi_osx/pmdarwin.c \ ../portmidi_osx/pmmacosx.c \ ../portmidi_osx/pmutil.c \ ../portmidi_osx/portmidi.c \ ../portmidi_osx/ptdarwin.c " STRIPFLAG="" GUINAME="pdtcl" GUIFLAGS="-F../../Frameworks -framework Tcl -framework Tk \ -I../../Frameworks/Tk.framework/Versions/Current/Headers \ -I../../Frameworks/Tcl.framework/Versions/Current/Headers \ -I../../Frameworks/Tcl.framework/Versions/8.4/PrivateHeaders"
if test x$USE_DEBUG == "xyes"; then OPT_CFLAGS="-g" else OPT_CFLAGS="-O3" fi
OSNUMBER=2 EXTERNTARGET=pd_darwin
dnl Set processor flags if test "$optimize" == "G3"; then OPT_CFLAGS=$OPT_CFLAGS" -mtune=G3 -mcpu=G3 -malign-natural" fi if test "$optimize" == "G4"; then OPT_CFLAGS=$OPT_CFLAGS" -mtune=G4 -mcpu=G4 -maltivec -malign-natural" fi if test "$optimize" == "G5"; then OPT_CFLAGS=$OPT_CFLAGS" -march=G5 -cpu=G5 -maltivec -malign-natural" fi
dnl Enable SIMD instructions if test "$simdcode" == "yes"; then OPT_CFLAGS=$OPT_CFLAGS" -faltivec" fi fi
# extra flags for alpha machines if test `uname -m | awk '{print $1}'` = alpha; then MORECFLAGS=$MORECFLAGS" -mieee -mcpu=ev56" fi
# test for compaq compiler---not sure what this does or how to test it. if test x$CC == xccc; then MORECFLAGS=$MORECFLAGS" -g3 -D__COMPAQC__ -arch host" fi
dnl test for xmmintrin.h header file CFLAGS=$OPT_CFLAGS AC_TRY_COMPILE([#]include "xmmintrin.h", ,MORECFLAGS=$MORECFLAGS" -DDAZ",)
AC_OUTPUT(makefile)
- with --enable-simd (on P4) the FFT examples like pvoc are silent,
although the normal test tone patch is working as expected. Enabling/disabling FFTW support has no effect on that.
that's strange ... might be a problem with tabsend~/receive~ ... i'll look into it ...
- the threaded soundfiler can't launch its thread when pd is started
as "pd -rt" as a normal user.
i'm not sure, how i can deal with that ... especially if the realtime security module is used ... temprorary fix is in cvs ...
- "pd -alsa" is always crashing (segmentation fault) when selecting
devices in the user dialog.
i never used alsa, since it's not working for my hdsp ...
cheers ... tim
- with --enable-simd (on P4) the FFT examples like pvoc are silent,
although the normal test tone patch is working as expected. Enabling/disabling FFTW support has no effect on that.
fixed ... squaring problem ...
cheers ... tim