$NetBSD: patch-ae,v 1.6 2007/02/23 03:27:41 rillig Exp $ --- configure.in.orig 2005-11-27 03:33:31.000000000 +0100 +++ configure.in 2007-02-23 02:06:19.000000000 +0100 @@ -556,8 +556,8 @@ if [[ "$use_portaudio" = "v19" ]] ; then AC_CONFIG_SUBDIRS([[lib-src/portaudio-v19]]) -else - +fi +if [[ "$use_portaudio" = "v18" ]] ; then CXXFLAGS="-I../lib-src/portaudio/pa_common $CXXFLAGS" case "${host_os}" in @@ -639,6 +639,81 @@ else esac fi +if [[ "$use_portaudio" = "system" ]] ; then + + LIBS="$LIBS -lportaudio" + + case "${host_os}" in + darwin* | rhapsody*) + dnl Mac OS X configuration + + CONFIGHEADER="configunix.h" + + dnl CoreAudio + + 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 + + dnl VST + + OPTOBJS="$OPTOBJS \$(OBJDIR)/effects/VST/LoadVSTMac.o" + OPTOBJS="$OPTOBJS \$(OBJDIR)/effects/VST/VSTEffect.o" + + ;; + + cygwin*) + dnl Windows/CygWin configuration + + 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 + + AC_DEFINE(__CYGWIN__,1,[We're using cygwin]) + AC_DEFINE(_FILE_OFFSET_BITS,32,[Placeholder for large file support]) + + AFTERBUILD="" + ;; + + *) + dnl Unix OSS configuration + + 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"