1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

3rd attempt to Add the ability to build without trashing the source tree

Hopefully this take care of all situations.
This commit is contained in:
lllucius@gmail.com 2014-10-28 06:27:57 +00:00
parent 49ce8fd212
commit 7f8270a5c8
10 changed files with 48 additions and 44 deletions

21
configure vendored
View File

@ -22135,10 +22135,11 @@ fi
if test "$vorbisenc_h_available" = "yes" -a "$ogg_h_available" = "yes"; then
LIBVORBIS_LOCAL_AVAILABLE="yes"
libogg_dir="$(pwd)/lib-src/libogg"
LIBVORBIS_LOCAL_CONFIGURE_ARGS="--disable-oggtest OGG_CFLAGS=-I${libogg_dir}/include OGG_LIBS=${libogg_dir}/src/libogg.la"
ogg_srcdir="$(pwd)/${srcdir}/lib-src/libogg"
ogg_blddir="$(pwd)/lib-src/libogg"
LIBVORBIS_LOCAL_CONFIGURE_ARGS="--disable-oggtest OGG_CFLAGS='-I${ogg_blddir}/include -I${ogg_srcdir}/include' OGG_LIBS=${ogg_blddir}/src/libogg.la"
LIBVORBIS_LOCAL_CONFIGURE_ARGS="$LIBVORBIS_LOCAL_CONFIGURE_ARGS --with-ogg-includes=${libogg_dir}/include --with-ogg-libraries=${libogg_dir}/src/.libs"
LIBVORBIS_LOCAL_CONFIGURE_ARGS="$LIBVORBIS_LOCAL_CONFIGURE_ARGS --with-ogg-includes='${ogg_blddir}/include -I${ogg_srcdir}/include' --with-ogg-libraries=${ogg_blddir}/src/.libs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Vorbis libraries are available in this source tree" >&5
$as_echo "$as_me: Vorbis libraries are available in this source tree" >&6;}
@ -22404,8 +22405,8 @@ fi
if test "$PORTAUDIO_LOCAL_AVAILABLE" = "yes"; then
portaudio_dir="$(pwd)/lib-src/portaudio-v19"
PORTAUDIO_LOCAL_CONFIGURE_ARGS="PORTAUDIO_CFLAGS=-I${portaudio_dir}/include PORTAUDIO_LIBS=${portaudio_dir}/lib/libportaudio.la"
pa_dir="$(pwd)/${srcdir}/lib-src/portaudio-v19"
PORTAUDIO_LOCAL_CONFIGURE_ARGS="PORTAUDIO_CFLAGS=-I${pa_dir}/include PORTAUDIO_LIBS=${pa_dir}/lib/libportaudio.la"
{ $as_echo "$as_me:${as_lineno-$LINENO}: portaudio19 library is available in the local tree" >&5
$as_echo "$as_me: portaudio19 library is available in the local tree" >&6;}
else
@ -22988,7 +22989,7 @@ $as_echo "#define USE_LIBID3TAG 1" >>confdefs.h
if test "$LIBMAD_USE_LOCAL" = yes; then
LIBMAD_CFLAGS='-I$(top_srcdir)/lib-src/libmad -I$(top_builddir)/lib-src/libmad'
LIBMAD_CFLAGS='-I$(top_builddir)/lib-src/libmad -I$(top_srcdir)/lib-src/libmad'
LIBMAD_LIBS='$(top_builddir)/lib-src/libmad/libmad.la'
subdirs="$subdirs lib-src/libmad"
@ -23158,7 +23159,7 @@ $as_echo "#define USE_SBSMS 1" >>confdefs.h
if test "$LIBSNDFILE_USE_LOCAL" = yes; then
SNDFILE_CFLAGS='-I$(top_srcdir)/lib-src/libsndfile/src'
SNDFILE_CFLAGS='-I$(top_builddir)/lib-src/libsndfile/src -I$(top_srcdir)/lib-src/libsndfile/src'
SNDFILE_LIBS='$(top_builddir)/lib-src/libsndfile/src/.libs/libsndfile.a'
subdirs="$subdirs lib-src/libsndfile"
@ -23178,7 +23179,7 @@ fi
if test "$LIBSOUNDTOUCH_USE_LOCAL" = yes; then
SOUNDTOUCH_CFLAGS='-I$(top_srcdir)/lib-src/soundtouch/include -I$(top_builddir)/lib-src/soundtouch/include'
SOUNDTOUCH_CFLAGS='-I$(top_builddir)/lib-src/soundtouch/include -I$(top_srcdir)/lib-src/soundtouch/include'
SOUNDTOUCH_LIBS='$(top_builddir)/lib-src/soundtouch/source/SoundTouch/.libs/libSoundTouch.a'
subdirs="$subdirs lib-src/soundtouch"
@ -23314,7 +23315,7 @@ $as_echo "#define USE_VAMP 1" >>confdefs.h
if test "$LIBVORBIS_USE_LOCAL" = yes; then
LIBVORBIS_CFLAGS='-I$(top_srcdir)/lib-src/libogg/include -I$(top_srcdir)/lib-src/libvorbis/include'
LIBVORBIS_CFLAGS='-I$(top_builddir)/lib-src/libogg/include -I$(top_srcdir)/lib-src/libogg/include -I$(top_srcdir)/lib-src/libvorbis/include'
LIBVORBIS_LIBS='$(top_builddir)/lib-src/libvorbis/lib/libvorbisenc.la $(top_builddir)/lib-src/libvorbis/lib/libvorbisfile.la'
subdirs="$subdirs lib-src/libogg lib-src/libvorbis"
@ -27283,7 +27284,7 @@ echo ""
echo "Finished configure:"
# Copy the contents of the locale directory to the build directory
! -e "${ac_abs+top_builddir}/po/LINGUAS" && cp -a "${ac_abs_top_srcdir}/po/"* "${ac_abs_top_builddir}/po/"
[ ! -e "${ac_abs_top_builddir}/po/LINGUAS" ] && cp -a "${ac_abs_top_srcdir}/po/"* "${ac_abs_top_builddir}/po/"
for lib in $LIBRARIES ; do
eval LIB_USE_LOCAL=\$${lib}_USE_LOCAL

View File

@ -736,7 +736,7 @@ echo ""
echo "Finished configure:"
# Copy the contents of the locale directory to the build directory
[ ! -e "${ac_abs+top_builddir}/po/LINGUAS" ] && cp -a "${ac_abs_top_srcdir}/po/"* "${ac_abs_top_builddir}/po/"
[[ ! -e "${ac_abs_top_builddir}/po/LINGUAS" ]] && cp -a "${ac_abs_top_srcdir}/po/"* "${ac_abs_top_builddir}/po/"
for lib in $LIBRARIES ; do
eval LIB_USE_LOCAL=\$${lib}_USE_LOCAL

View File

@ -3,7 +3,7 @@
# Written by Richard Ash following Gary Vaughan's Autobook
PORTAUDIO_CFLAGS = -I${srcdir}/../portaudio-v19/include
SNDFILE_CFLAGS = -I${srcdir}/../libsndfile/src
SNDFILE_CFLAGS = -I${builddir}/../libsndfile/src
# tell aclocal that extra macros can be found in autotools/m4/
ACLOCAL_AMFLAGS = -I autotools/m4

View File

@ -464,7 +464,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
PORTAUDIO_CFLAGS = -I${srcdir}/../portaudio-v19/include
SNDFILE_CFLAGS = -I${srcdir}/../libsndfile/src
SNDFILE_CFLAGS = -I${builddir}/../libsndfile/src
# tell aclocal that extra macros can be found in autotools/m4/
ACLOCAL_AMFLAGS = -I autotools/m4

View File

@ -35,29 +35,29 @@ INSTALL_DATA = ${INSTALL} -m 644
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
# ${SHELL} /Users/yam/n/audacity/autotools/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, $(top_builddir)/autotools/install-sh -c -d is derived from ${MKDIR_P}, which is defined
# ${SHELL} /home/yam/fix/audacity/autotools/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, /usr/bin/mkdir -p is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
mkinstalldirs = $(SHELL) ${SHELL} /Users/yam/n/audacity/autotools/install-sh -d
install_sh = $(SHELL) ${SHELL} /Users/yam/n/audacity/autotools/install-sh
MKDIR_P = ../autotools/install-sh -c -d
mkdir_p = $(top_builddir)/autotools/install-sh -c -d
mkinstalldirs = $(SHELL) ${SHELL} /home/yam/fix/audacity/autotools/install-sh -d
install_sh = $(SHELL) ${SHELL} /home/yam/fix/audacity/autotools/install-sh
MKDIR_P = /usr/bin/mkdir -p
mkdir_p = /usr/bin/mkdir -p
GMSGFMT_ = /opt/local/bin/msgfmt
GMSGFMT_no = /opt/local/bin/msgfmt
GMSGFMT_yes = /opt/local/bin/msgfmt
GMSGFMT_ = /usr/bin/msgfmt
GMSGFMT_no = /usr/bin/msgfmt
GMSGFMT_yes = /usr/bin/msgfmt
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
MSGFMT_ = /opt/local/bin/msgfmt
MSGFMT_no = /opt/local/bin/msgfmt
MSGFMT_yes = /opt/local/bin/msgfmt
MSGFMT_ = /usr/bin/msgfmt
MSGFMT_no = /usr/bin/msgfmt
MSGFMT_yes = /usr/bin/msgfmt
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
XGETTEXT_ = /opt/local/bin/xgettext
XGETTEXT_no = /opt/local/bin/xgettext
XGETTEXT_yes = /opt/local/bin/xgettext
XGETTEXT_ = /usr/bin/xgettext
XGETTEXT_no = /usr/bin/xgettext
XGETTEXT_yes = /usr/bin/xgettext
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
MSGMERGE = msgmerge
MSGMERGE_UPDATE = /opt/local/bin/msgmerge --update
MSGMERGE_UPDATE = /usr/bin/msgmerge --update
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
@ -89,14 +89,16 @@ CATALOGS = @CATALOGS@
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo; \
dir=$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir && (cd $$dir ; ln -s ../../$${lang}.gmo $(DOMAIN).mo)
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all: check-macro-version all-no
all: check-macro-version all-yes
all-yes: stamp-po
all-no:
@ -209,7 +211,7 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot
install: install-exec install-data
install-exec:
install-data: install-data-no
install-data: install-data-yes
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
@ -267,7 +269,7 @@ install-strip: install
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-no
installdirs-data: installdirs-data-yes
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
else \
@ -311,7 +313,7 @@ installcheck:
uninstall: uninstall-exec uninstall-data
uninstall-exec:
uninstall-data: uninstall-data-no
uninstall-data: uninstall-data-yes
if test "$(PACKAGE)" = "gettext-tools"; then \
for file in $(DISTFILES.common) Makevars.template; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \

View File

@ -48,7 +48,7 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBMAD], [
AC_DEFUN([AUDACITY_CONFIG_LIBMAD], [
if test "$LIBMAD_USE_LOCAL" = yes; then
LIBMAD_CFLAGS='-I$(top_srcdir)/lib-src/libmad -I$(top_builddir)/lib-src/libmad'
LIBMAD_CFLAGS='-I$(top_builddir)/lib-src/libmad -I$(top_srcdir)/lib-src/libmad'
LIBMAD_LIBS='$(top_builddir)/lib-src/libmad/libmad.la'
AC_CONFIG_SUBDIRS([lib-src/libmad])
fi

View File

@ -46,7 +46,7 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBSNDFILE], [
AC_DEFUN([AUDACITY_CONFIG_LIBSNDFILE], [
if test "$LIBSNDFILE_USE_LOCAL" = yes; then
SNDFILE_CFLAGS='-I$(top_srcdir)/lib-src/libsndfile/src'
SNDFILE_CFLAGS='-I$(top_builddir)/lib-src/libsndfile/src -I$(top_srcdir)/lib-src/libsndfile/src'
SNDFILE_LIBS='$(top_builddir)/lib-src/libsndfile/src/.libs/libsndfile.a'
AC_CONFIG_SUBDIRS([lib-src/libsndfile])
fi

View File

@ -54,7 +54,7 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBSOUNDTOUCH], [
AC_DEFUN([AUDACITY_CONFIG_LIBSOUNDTOUCH], [
if test "$LIBSOUNDTOUCH_USE_LOCAL" = yes; then
SOUNDTOUCH_CFLAGS='-I$(top_srcdir)/lib-src/soundtouch/include -I$(top_builddir)/lib-src/soundtouch/include'
SOUNDTOUCH_CFLAGS='-I$(top_builddir)/lib-src/soundtouch/include -I$(top_srcdir)/lib-src/soundtouch/include'
SOUNDTOUCH_LIBS='$(top_builddir)/lib-src/soundtouch/source/SoundTouch/.libs/libSoundTouch.a'
AC_CONFIG_SUBDIRS([lib-src/soundtouch])
fi

View File

@ -43,12 +43,13 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBVORBIS], [
dnl We need to override the pkg-config check for libogg by passing
dnl OGG_CFLAGS and OGG_LIBS to the configure script of libvorbis.
libogg_dir="$(pwd)/lib-src/libogg"
LIBVORBIS_LOCAL_CONFIGURE_ARGS="--disable-oggtest OGG_CFLAGS=-I${libogg_dir}/include OGG_LIBS=${libogg_dir}/src/libogg.la"
ogg_srcdir="$(pwd)/${srcdir}/lib-src/libogg"
ogg_blddir="$(pwd)/lib-src/libogg"
LIBVORBIS_LOCAL_CONFIGURE_ARGS="--disable-oggtest OGG_CFLAGS='-I${ogg_blddir}/include -I${ogg_srcdir}/include' OGG_LIBS=${ogg_blddir}/src/libogg.la"
dnl libflac needs libogg too. So we need to pass these flags to the
dnl configure script of libflac, because it does not use pkg-config.
LIBVORBIS_LOCAL_CONFIGURE_ARGS="$LIBVORBIS_LOCAL_CONFIGURE_ARGS --with-ogg-includes=${libogg_dir}/include --with-ogg-libraries=${libogg_dir}/src/.libs"
LIBVORBIS_LOCAL_CONFIGURE_ARGS="$LIBVORBIS_LOCAL_CONFIGURE_ARGS --with-ogg-includes='${ogg_blddir}/include -I${ogg_srcdir}/include' --with-ogg-libraries=${ogg_blddir}/src/.libs"
AC_MSG_NOTICE([Vorbis libraries are available in this source tree])
else
@ -59,7 +60,7 @@ AC_DEFUN([AUDACITY_CHECKLIB_LIBVORBIS], [
AC_DEFUN([AUDACITY_CONFIG_LIBVORBIS], [
if test "$LIBVORBIS_USE_LOCAL" = yes; then
LIBVORBIS_CFLAGS='-I$(top_srcdir)/lib-src/libogg/include -I$(top_srcdir)/lib-src/libvorbis/include'
LIBVORBIS_CFLAGS='-I$(top_builddir)/lib-src/libogg/include -I$(top_srcdir)/lib-src/libogg/include -I$(top_srcdir)/lib-src/libvorbis/include'
LIBVORBIS_LIBS='$(top_builddir)/lib-src/libvorbis/lib/libvorbisenc.la $(top_builddir)/lib-src/libvorbis/lib/libvorbisfile.la'
AC_CONFIG_SUBDIRS([lib-src/libogg lib-src/libvorbis])
fi

View File

@ -38,8 +38,8 @@ AC_DEFUN([AUDACITY_CHECKLIB_PORTAUDIO], [
if test "$PORTAUDIO_LOCAL_AVAILABLE" = "yes"; then
dnl We need to override the pkg-config check for portmixer by passing
dnl PORTAUDIO_CFLAGS and PORTAUDIO_LIBS to the configure script of portmixer.
portaudio_dir="$(pwd)/lib-src/portaudio-v19"
PORTAUDIO_LOCAL_CONFIGURE_ARGS="PORTAUDIO_CFLAGS=-I${portaudio_dir}/include PORTAUDIO_LIBS=${portaudio_dir}/lib/libportaudio.la"
pa_dir="$(pwd)/${srcdir}/lib-src/portaudio-v19"
PORTAUDIO_LOCAL_CONFIGURE_ARGS="PORTAUDIO_CFLAGS=-I${pa_dir}/include PORTAUDIO_LIBS=${pa_dir}/lib/libportaudio.la"
AC_MSG_NOTICE([portaudio19 library is available in the local tree])
else
AC_MSG_NOTICE([portaudio19 library is NOT available in the local tree])