$NetBSD: patch-af,v 1.4 2004/11/22 16:36:31 adam Exp $ --- configure.orig 2004-11-18 06:17:29.000000000 +0000 +++ configure @@ -6118,7 +6118,8 @@ fi subdirs="$subdirs lib-src/portaudio-v19" -else +fi +if [ "$use_portaudio" = "v18" ] ; then CXXFLAGS="-I../lib-src/portaudio/pa_common $CXXFLAGS" @@ -6204,6 +6205,84 @@ _ACEOF esac fi +if [ "$use_portaudio" = "system" ] ; then + + LIBS="$LIBS -lportaudio" + + case "${host_os}" in + darwin* | rhapsody*) + + CONFIGHEADER="configunix.h" + + + CXXFLAGS="-I../mac $CXXFLAGS" + + if [ "$use_portmixer" = "yes" ] ; then + BUILDLIBS="$BUILDLIBS portmixer/px_mac_core/portmixer.a" + EXTRAOBJS="$EXTRAOBJS ../lib-src/portmixer/px_mac_core/portmixer.a" + fi + + LIBS="-framework AudioUnit -framework AudioToolbox $LIBS" + LIBS="-framework CoreAudio $LIBS -lz" + + EXTRATARGETS="../Audacity.app" + + if [ "$use_ladspa" = "default" ] ; then + use_ladspa="yes"; + fi + + + OPTOBJS="$OPTOBJS \$(OBJDIR)/effects/VST/LoadVSTMac.o" + OPTOBJS="$OPTOBJS \$(OBJDIR)/effects/VST/VSTEffect.o" + + ;; + + cygwin*) + + LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lwsock32 -lwinmm" + LIBS="$LIBS -Wl,--subsystem,windows" + CONFIGHEADER="configwin.h" + + if [ "$use_portmixer" = "yes" ] ; then + BUILDLIBS="$BUILDLIBS portmixer/px_win_wmme/portmixer.a" + EXTRAOBJS="$EXTRAOBJS ../lib-src/portmixer/px_win_wmme/portmixer.a Audacity.coff" + fi + + if [ "$use_ladspa" = "default" ] ; then + use_ladspa="yes"; + fi + + +cat >>confdefs.h <<\_ACEOF +#define __CYGWIN__ 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _FILE_OFFSET_BITS 32 +_ACEOF + + + AFTERBUILD="" + ;; + + *) + + CONFIGHEADER="configunix.h" + + if [ "$use_portmixer" = "yes" ] ; then + BUILDLIBS="$BUILDLIBS portmixer/px_unix_oss/portmixer.a" + EXTRAOBJS="$EXTRAOBJS ../lib-src/portmixer/px_unix_oss/portmixer.a" + fi + + if [ "$use_ladspa" = "default" ] ; then + use_ladspa="yes"; + fi + + AFTERBUILD="" + + esac +fi use_precomp="no"