From e75de697830bee249ab9678ed08c8c4ea927a556 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Wed, 25 Oct 2006 10:33:02 +0000 Subject: [PATCH] Patches by Azzy: - Search for both lua and lua50 libraries (fixes building on Debian/Ubuntu) - Fix GCC preprocessor failing on version.cpp Also forgot changelog for last commit Originally committed to SVN as r541. --- configure.ac | 5 +++-- core/automation.cpp | 5 +++++ core/automation.h | 4 ++++ core/changelog.txt | 2 ++ core/version.cpp | 6 ++++-- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 7db71acdf..51abfdd1e 100644 --- a/configure.ac +++ b/configure.ac @@ -83,8 +83,9 @@ LIBS="$LIBS `$WXCONFIG --libs` $FREETYPE_LIBS" AC_CHECK_LIB([m], [main]) AC_CHECK_LIB([dl], [dlopen]) -AC_CHECK_LIB([lua], [lua_call],, [AC_MSG_ERROR([lua not found.])]) -AC_CHECK_LIB([lualib], [lua_tostring],, [AC_MSG_WARN([lualib not found, assuming lua 5.2])]) +AC_CHECK_HEADERS([lua.h lua50/lua.h]) +AC_SEARCH_LIBS([lua_call], [lua lua50],, [AC_MSG_ERROR([lua not found.])]) +AC_SEARCH_LIBS([luaopen_base], [lualib lualib50],, [AC_MSG_WARN([lualib not found, assuming lua 5.1])]) AC_CHECK_LIB([portaudio], [Pa_Initialize],, [AC_MSG_ERROR([portaudio not found.])]) AC_CHECK_LIB([avcodec], [avcodec_init]) AC_CHECK_LIB([avformat], [av_frac_init]) diff --git a/core/automation.cpp b/core/automation.cpp index 9e03949d8..8d25c3d21 100644 --- a/core/automation.cpp +++ b/core/automation.cpp @@ -57,8 +57,13 @@ #endif extern "C" { +#ifdef HAVE_LUA50_LUA_H +#include +#include +#else #include #include +#endif } int L_callfunc(lua_State *L, int nargs, int nresults); diff --git a/core/automation.h b/core/automation.h index e0689cd6c..15d85fddf 100644 --- a/core/automation.h +++ b/core/automation.h @@ -34,7 +34,11 @@ // extern "C" { +#if HAVE_LUA50_LUA_H +#include +#else #include +#endif } #include diff --git a/core/changelog.txt b/core/changelog.txt index 39345c37d..b621c7727 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -15,6 +15,8 @@ Please visit http://aegisub.net to download latest version - Added long-missing Edit buttons in Style Manager (jfs) - Various fixes to better handle paths/file names with non-ANSI characters on Windows (jfs) o Note that this (unfortunately) doesn't affect video/audio loading, since those still depend on Avisynth, which doesn't support Unicode at all +- Video display fixed on Linux and maybe also Mac (Azzy) +- Misc. fixes for building on Linux (Azzy) = 1.10 beta - 2006.08.07 =========================== diff --git a/core/version.cpp b/core/version.cpp index 3482427dd..e270e1885 100644 --- a/core/version.cpp +++ b/core/version.cpp @@ -55,7 +55,9 @@ #endif #endif -#define BUILD_TIMESTAMP _T(__DATE__) _T(" ") _T(__TIME__) +#define _T_rec(X) _T(X) + +#define BUILD_TIMESTAMP _T_rec(__DATE__) _T(" ") _T_rec(__TIME__) // If the BUILD_SVN_REVISION happens to be negative, the build is assumed to be a public-release build (ie. not prerel) // So manually edit build/svn-revision.h to match that, when doing such a build, or add some other magic to do that. @@ -86,7 +88,7 @@ struct VersionInfoStruct { #endif SvnRev = BUILD_SVN_REVISION; BuildTime = BUILD_TIMESTAMP; - BuildCredit = _T(BUILD_CREDIT); + BuildCredit = _T_rec(BUILD_CREDIT); if (SvnRev > 0) SCMStr = wxString::Format(_T("SVN r%d"), SvnRev);