Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30818
Modified Files: Tag: devel_0_37 makefile.in configure.in s_audio.c s_audio_alsa.c s_loader.c s_main.c Log Message: further cleanup of autoconf script and renaming of defines
Index: s_loader.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v retrieving revision 1.1.1.2.2.2 retrieving revision 1.1.1.2.2.3 diff -C2 -d -r1.1.1.2.2.2 -r1.1.1.2.2.3 *** s_loader.c 7 Oct 2004 23:11:56 -0000 1.1.1.2.2.2 --- s_loader.c 9 Oct 2004 07:42:34 -0000 1.1.1.2.2.3 *************** *** 3,9 **** * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! #ifdef DL_OPEN #include <dlfcn.h> ! #endif #ifdef UNIX #include <stdlib.h> --- 3,9 ---- * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! #ifdef HAVE_LIBDL #include <dlfcn.h> ! #endif /* HAVE_LIBDL */ #ifdef UNIX #include <stdlib.h> *************** *** 102,106 **** /* and append _setup to form the C setup function name */ strcat(symname, "_setup"); ! #ifdef DL_OPEN dlobj = dlopen(filename, RTLD_NOW | RTLD_GLOBAL); if (!dlobj) --- 102,106 ---- /* and append _setup to form the C setup function name */ strcat(symname, "_setup"); ! #ifdef HAVE_LIBDL dlobj = dlopen(filename, RTLD_NOW | RTLD_GLOBAL); if (!dlobj) *************** *** 111,115 **** } makeout = (t_xxx)dlsym(dlobj, symname); ! #endif #ifdef MSW sys_bashfilename(filename, filename); --- 111,115 ---- } makeout = (t_xxx)dlsym(dlobj, symname); ! #endif /* HAVE_LIBDL */ #ifdef MSW sys_bashfilename(filename, filename); *************** *** 169,179 **** return (1); } - - - - - - - - - --- 169,170 ----
Index: s_audio_alsa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsa.c,v retrieving revision 1.1.1.1.2.7 retrieving revision 1.1.1.1.2.8 diff -C2 -d -r1.1.1.1.2.7 -r1.1.1.1.2.8 *** s_audio_alsa.c 22 Feb 2004 17:36:51 -0000 1.1.1.1.2.7 --- s_audio_alsa.c 9 Oct 2004 07:42:34 -0000 1.1.1.1.2.8 *************** *** 6,9 **** --- 6,11 ---- /* this file inputs and outputs audio using the ALSA API available on linux. */
+ #ifdef HAVE_LIBASOUND + #include <alsa/asoundlib.h>
*************** *** 941,942 **** --- 943,946 ---- *nindevs = *noutdevs = j; } + + #endif /* HAVE_LIBASOUND */
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.1.1.4.2.18 retrieving revision 1.1.1.4.2.19 diff -C2 -d -r1.1.1.4.2.18 -r1.1.1.4.2.19 *** s_main.c 8 Oct 2004 17:58:27 -0000 1.1.1.4.2.18 --- s_main.c 9 Oct 2004 07:42:34 -0000 1.1.1.4.2.19 *************** *** 348,352 **** #endif
! #ifdef USEAPI_ALSA "-alsa -- use ALSA audio API\n", "-alsadev <n> ----- obsolete: use -audiodev\n", --- 348,352 ---- #endif
! #ifdef HAVE_LIBASOUND "-alsa -- use ALSA audio API\n", "-alsadev <n> ----- obsolete: use -audiodev\n", *************** *** 620,624 **** } #endif ! #ifdef USEAPI_ALSA else if (!strcmp(*argv, "-alsa")) { --- 620,624 ---- } #endif ! #ifdef HAVE_LIBASOUND else if (!strcmp(*argv, "-alsa")) {
Index: configure.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/configure.in,v retrieving revision 1.1.1.4.2.24 retrieving revision 1.1.1.4.2.25 diff -C2 -d -r1.1.1.4.2.24 -r1.1.1.4.2.25 *** configure.in 8 Oct 2004 17:58:27 -0000 1.1.1.4.2.24 --- configure.in 9 Oct 2004 07:42:34 -0000 1.1.1.4.2.25 *************** *** 15,65 **** AC_SUBST(CC)
- dnl other defaults - - dnl check for features - - AC_ARG_ENABLE(alsa, [ --disable-alsa disable ALSA], - alsa=$enableval,alsa=yes) - - AC_ARG_ENABLE(jack, [ --enable-jack jack audio server], - 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") - ) - - 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], - static=$enableval,static=no)
- 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],icc=$enableval,icc=no) - - AC_ARG_ENABLE(optimize, [ --enable-optimize enables optimized builds for: pentium4, pentium3, G4, G5],optimize=$enableval,optimize=no) - - AC_ARG_ENABLE(simd, [ --enable-simd use SIMD code],simdcode=$enableval,simdcode=no) - - AC_ARG_ENABLE(threadedgui, [ --enable-threadedgui use yves degoyon's threaded gui patch],threadedgui=$enableval,threadedgui=no) - - AC_ARG_ENABLE(threadedsf, [ --enable-threadedsf use threaded soundfiler (EXPERIMENTAL, implies --enable-gathreadlocks)],threadedsf=$enableval,threadedsf=no) - - AC_ARG_ENABLE(gathreadlocks, [ --enable-gathreadlocks t_garray threadlocks (EXPERIMENTAL)],gathreadlocks=$enableval,gathreadlocks=no) - - dnl Checks for programs. - if test "$icc" == "yes"; - then - AC_CHECK_PROG(icc,icc,export CC=icc) - CC=icc - else - AC_PROG_CC - fi
AC_PROG_INSTALL AC_PROG_MAKE_SET --- 15,22 ---- AC_SUBST(CC)
+ dnl other defaults + AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET *************** *** 77,84 ****
dnl Checks for library functions. ! if test "$icc" = "no"; ! then ! AC_PROG_GCC_TRADITIONAL ! fi AC_TYPE_SIGNAL AC_FUNC_VPRINTF --- 34,38 ----
dnl Checks for library functions. ! AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL AC_FUNC_VPRINTF *************** *** 87,110 ****
dnl Checks for libraries. ! dnl Checking for `dlopen' function in -ldl: ! AC_CHECK_LIB(dl, dlopen,PDLIB="$PDLIB -ldl", ! echo "dynamic link support required" || exit 1)
! dnl Checking for `sin' function in -lm: ! dnl we won't need the math library for icc, since it's using it's own - TB ! if test "$icc" = "no"; then ! AC_CHECK_LIB(m, sin,PDLIB="$PDLIB -lm", ! echo "math library required" || exit 1) ! fi
! dnl Checking for `pthread_create' function in -pthread ! AC_CHECK_LIB(pthread, pthread_create,PDLIB="$PDLIB -lpthread", ! echo "pthreads required" || exit 1)
dnl Find paths to includes and libraries for X11 AC_PATH_X dnl Checking for `XCreateWindow' function in -lX11: ! AC_CHECK_LIB(X11, XCreateWindow, LIBS="$LIBS -lX11 -L$x_libraries", echo "no X11 found" || exit 1, -L$x_libraries)
--- 41,103 ----
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], ! , ! AC_CHECK_LIB(asound,snd_pcm_info) ! ) ! ! AC_ARG_ENABLE(jack, [ --enable-jack jack audio server], ! 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") ! ) ! ! 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(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,optimize=no) ! ! 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)
*************** *** 127,166 ****
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 "$threadedgui" == "yes"; then - MORECFLAGS=$MORECFLAGS" -DTHREADED_GUI" - fi - - if test "$threadedsf" == "yes"; then - MORECFLAGS=$MORECFLAGS" -DTHREADED_SF -DGARRAY_THREAD_LOCK -D_GNU_SOURCE" - fi - - if test "$gathreadlocks" == "yes"; then - MORECFLAGS=$MORECFLAGS" -DGARRAY_THREAD_LOCK -D_GNU_SOURCE" - fi - - if test "$simdcode" != "yes"; then - MORECFLAGS=$MORECFLAGS" -DDONTUSESIMD" - fi - - if test `uname -s` == Linux; then - dnl Checking for ALSA - - dnl This should be fixed so Pd can use ALSA shared libraries where appropriate. - if test x$alsa == xyes; then - echo yes ... alsa is... $alsa - AC_CHECK_LIB(asound,snd_pcm_info,PDLIB="$PDLIB -lasound" ; alsa="yes",alsa="no") - fi - dnl Set processor flags if test "$icc" == "yes"; then --- 120,133 ----
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 `uname -s` == Linux; then dnl Set processor flags if test "$icc" == "yes"; then *************** *** 179,195 **** fi if test "$optimize" == "pentium2"; then ! ARCH_CFLAGS="-mtune=pentium2 -march=pentium2 -mmmx" fi if test "$optimize" == "pentium"; then ARCH_CFLAGS="-mtune=pentium -march=pentium" fi fi
LDFLAGS="$LDFLAGS -Wl,-export-dynamic" ! if test "$static" == "yes"; then ! LDFLAGS="$LDFLAGS -static" ! fi EXT=pd_linux ! MORECFLAGS=$MORECFLAGS" -DDL_OPEN -DPA_USE_OSS -DPA_LITTLE_ENDIAN \ -DUSEAPI_OSS \ -I../portaudio/pa_common \ --- 146,162 ---- fi if test "$optimize" == "pentium2"; then ! ARCH_CFLAGS="-mtune=pentium2 -march=pentium2 -mmmx"; ! MORECFLAGS=$MORECFLAGS" -DDONTUSESIMD" fi if test "$optimize" == "pentium"; then ARCH_CFLAGS="-mtune=pentium -march=pentium" + MORECFLAGS=$MORECFLAGS" -DDONTUSESIMD" fi fi
LDFLAGS="$LDFLAGS -Wl,-export-dynamic" ! EXT=pd_linux ! MORECFLAGS=$MORECFLAGS" -DPA_USE_OSS -DPA_LITTLE_ENDIAN \ -DUSEAPI_OSS \ -I../portaudio/pa_common \ *************** *** 198,208 **** SYSSRC="s_midi_oss.c s_audio_oss.c"
- if test x$alsa == "xyes"; - then - SYSSRC=$SYSSRC" s_audio_alsa.c" - MORECFLAGS=$MORECFLAGS" -DPA_USE_ALSA -DUSEAPI_ALSA" - LDFLAGS=$LDFLAGS" -lasound" - fi - if test x$portaudio == "xyes"; then --- 165,168 ---- *************** *** 241,245 **** OPT_CFLAGS=$ARCH_CFLAGS" -O3" else ! OPT_CFLAGS=$ARCH_CFLAGS" -O6 -funroll-loops -fomit-frame-pointer" fi fi --- 201,205 ---- OPT_CFLAGS=$ARCH_CFLAGS" -O3" else ! OPT_CFLAGS=$ARCH_CFLAGS" -O3 -funroll-loops -fomit-frame-pointer" fi fi *************** *** 251,267 **** fi
- dnl test for header file - cat > conftest.c << EOF - #include <xmmintrin.h> - int main() - { - return 0; - } - EOF - $CC $OPT_CFLAGS -o conftest.o conftest.c && MORECFLAGS=$MORECFLAGS" -DDAZ" && rm conftest.o - - rm conftest.c - - echo OPT_CFLAGS --------------- $OPT_CFLAGS OSNUMBER=0 --- 211,214 ---- *************** *** 270,274 **** if test `uname -s` == Darwin; then ! LDFLAGS="-Wl -framework Tcl -framework CoreAudio \ -framework AudioUnit -framework AudioToolbox \ -framework Carbon -framework CoreMIDI" --- 217,221 ---- if test `uname -s` == Darwin; then ! LDFLAGS=$LDFLAGS" -Wl -framework Tcl -framework CoreAudio \ -framework AudioUnit -framework AudioToolbox \ -framework Carbon -framework CoreMIDI" *************** *** 322,326 **** if test "$simdcode" == "yes"; then OPT_CFLAGS=$OPT_CFLAGS" -faltivec" ! fi fi
--- 269,273 ---- if test "$simdcode" == "yes"; then OPT_CFLAGS=$OPT_CFLAGS" -faltivec" ! fi fi
*************** *** 337,340 **** --- 284,291 ---- fi
+ dnl test for xmmintrin.h header file + CFLAGS=$OPT_CFLAGS + AC_TRY_COMPILE([#]include "xmmintrin.h", ,MORECFLAGS=$MORECFLAGS" -DDAZ",) + AC_OUTPUT(makefile)
Index: makefile.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/makefile.in,v retrieving revision 1.1.1.3.2.18 retrieving revision 1.1.1.3.2.19 diff -C2 -d -r1.1.1.3.2.18 -r1.1.1.3.2.19 *** makefile.in 8 Oct 2004 17:58:27 -0000 1.1.1.3.2.18 --- makefile.in 9 Oct 2004 07:42:34 -0000 1.1.1.3.2.19 *************** *** 41,45 **** m_conf.c m_glob.c m_sched.c \ s_main.c s_inter.c s_file.c s_print.c \ ! s_loader.c s_path.c s_entry.c s_audio.c s_audio_jack.c s_midi.c \ d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \ d_math.c d_fft.c d_mayer_fft.c d_fftroutine.c d_array.c d_global.c \ --- 41,46 ---- m_conf.c m_glob.c m_sched.c \ s_main.c s_inter.c s_file.c s_print.c \ ! s_loader.c s_path.c s_entry.c s_audio.c s_audio_jack.c s_audio_alsa.c \ ! s_midi.c \ d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \ d_math.c d_fft.c d_mayer_fft.c d_fftroutine.c d_array.c d_global.c \ *************** *** 92,97 ****
$(PDEXEC): $(OBJ) ! cd ../obj; $(CC) $(LDFLAGS) $(GLIB) $(DBG_CFLAGS) -o $(PDEXEC) $(OBJ) \ ! $(LIB)
$(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC) --- 93,98 ----
$(PDEXEC): $(OBJ) ! cd ../obj; $(CC) $(LDFLAGS) $(LIB) $(OPT_FLAGS) $(GLIB) $(DBG_CFLAGS) \ ! -o $(PDEXEC) $(OBJ)
$(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC)
Index: s_audio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v retrieving revision 1.1.1.1.2.9 retrieving revision 1.1.1.1.2.10 diff -C2 -d -r1.1.1.1.2.9 -r1.1.1.1.2.10 *** s_audio.c 8 Oct 2004 17:58:27 -0000 1.1.1.1.2.9 --- s_audio.c 9 Oct 2004 07:42:34 -0000 1.1.1.1.2.10 *************** *** 317,321 **** else #endif ! #ifdef USEAPI_ALSA /* for alsa, only one device is supported; it may be open for both input and output. */ --- 317,321 ---- else #endif ! #ifdef HAVE_LIBASOUND /* for alsa, only one device is supported; it may be open for both input and output. */ *************** *** 361,365 **** else #endif ! #ifdef USEAPI_ALSA if (sys_audioapi == API_ALSA) alsa_close_audio(); --- 361,365 ---- else #endif ! #ifdef HAVE_LIBASOUND if (sys_audioapi == API_ALSA) alsa_close_audio(); *************** *** 426,430 **** else #endif ! #ifdef USEAPI_ALSA if (sys_audioapi == API_ALSA) return (alsa_send_dacs()); --- 426,430 ---- else #endif ! #ifdef HAVE_LIBASOUND if (sys_audioapi == API_ALSA) return (alsa_send_dacs()); *************** *** 496,500 **** else #endif ! #ifdef USEAPI_ALSA if (sys_audioapi == API_ALSA) { --- 496,500 ---- else #endif ! #ifdef HAVE_LIBASOUND if (sys_audioapi == API_ALSA) { *************** *** 728,732 **** else #endif ! #ifdef USEAPI_ALSA if (sys_audioapi == API_ALSA) sys_listaudiodevs(); --- 728,732 ---- else #endif ! #ifdef HAVE_LIBASOUND if (sys_audioapi == API_ALSA) sys_listaudiodevs(); *************** *** 814,818 **** sprintf(buf + strlen(buf), "{"standard (MMIO)" %d} ", API_MMIO); n++; #endif ! #ifdef USEAPI_ALSA sprintf(buf + strlen(buf), "{ALSA %d} ", API_ALSA); n++; #endif --- 814,818 ---- sprintf(buf + strlen(buf), "{"standard (MMIO)" %d} ", API_MMIO); n++; #endif ! #ifdef HAVE_LIBASOUND sprintf(buf + strlen(buf), "{ALSA %d} ", API_ALSA); n++; #endif *************** *** 841,845 **** }
! #ifdef USEAPI_ALSA void alsa_putzeros(int n); void alsa_getzeros(int n); --- 841,845 ---- }
! #ifdef HAVE_LIBASOUND void alsa_putzeros(int n); void alsa_getzeros(int n); *************** *** 863,867 **** 1); } ! #ifdef USEAPI_ALSA else if (arg == gensym("alsawrite")) { --- 863,867 ---- 1); } ! #ifdef HAVE_LIBASOUND else if (arg == gensym("alsawrite")) {