From f0b2b26e0b853e65b6e167b6b5e8650c4ae87458 Mon Sep 17 00:00:00 2001 From: "benjamin.drung@gmail.com" Date: Mon, 11 Nov 2013 13:48:56 +0000 Subject: [PATCH] Move LAME header file from src/include to lib-src/lame/lame. The LAME header file is part of the upstream LAME project and does not belong in the src/ tree of Audacity. --- configure | 33 ++++++++++++++++++++++- {src/include => lib-src/lame/lame}/lame.h | 0 m4/audacity_checklib_lame.m4 | 11 +++++++- src/export/ExportMP3.cpp | 4 --- 4 files changed, 42 insertions(+), 6 deletions(-) rename {src/include => lib-src/lame/lame}/lame.h (100%) diff --git a/configure b/configure index 6f60d6de9..44e185259 100755 --- a/configure +++ b/configure @@ -6067,7 +6067,38 @@ $as_echo "$as_me: LAME library is NOT available as system library." >&6;} fi - LAME_LOCAL_AVAILABLE="yes" + as_ac_File=`$as_echo "ac_cv_file_${srcdir}/lib-src/lame/lame/lame.h" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${srcdir}/lib-src/lame/lame/lame.h" >&5 +$as_echo_n "checking for ${srcdir}/lib-src/lame/lame/lame.h... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "${srcdir}/lib-src/lame/lame/lame.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + LAME_LOCAL_AVAILABLE="yes" +else + LAME_LOCAL_AVAILABLE="no" +fi + + + if test "$LAME_LOCAL_AVAILABLE" = "yes"; then + LAME_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/lame' + { $as_echo "$as_me:${as_lineno-$LINENO}: LAME headers are available in this source tree." >&5 +$as_echo "$as_me: LAME headers are available in this source tree." >&6;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: LAME headers are NOT available in this source tree." >&5 +$as_echo "$as_me: LAME headers are NOT available in this source tree." >&6;} + fi diff --git a/src/include/lame.h b/lib-src/lame/lame/lame.h similarity index 100% rename from src/include/lame.h rename to lib-src/lame/lame/lame.h diff --git a/m4/audacity_checklib_lame.m4 b/m4/audacity_checklib_lame.m4 index 6fdfb9fcd..2cec7ddfa 100644 --- a/m4/audacity_checklib_lame.m4 +++ b/m4/audacity_checklib_lame.m4 @@ -44,5 +44,14 @@ AC_DEFUN([AUDACITY_CHECKLIB_LAME], [ dnl see if LAME is available in the source dir - LAME_LOCAL_AVAILABLE="yes" + AC_CHECK_FILE(${srcdir}/lib-src/lame/lame/lame.h, + LAME_LOCAL_AVAILABLE="yes", + LAME_LOCAL_AVAILABLE="no") + + if test "$LAME_LOCAL_AVAILABLE" = "yes"; then + LAME_LOCAL_CXXFLAGS='-I$(top_srcdir)/lib-src/lame' + AC_MSG_NOTICE([LAME headers are available in this source tree.]) + else + AC_MSG_NOTICE([LAME headers are NOT available in this source tree.]) + fi ]) diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index 4ba1d68d7..0c682f268 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -91,11 +91,7 @@ #include "Export.h" #include "ExportMP3.h" -#if defined(DISABLE_DYNAMIC_LOADING_LAME) #include -#else -#include "lame.h" -#endif #ifdef USE_LIBID3TAG #include