make it build on Linux

Originally committed to SVN as r767.
This commit is contained in:
David Lamparter 2007-01-11 03:52:17 +00:00
parent 20f7e80ec2
commit 88a00fbdb0
5 changed files with 51 additions and 12 deletions

View file

@ -1,3 +1,8 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = ac aegisub locale
lua51/src/liblua.a:
make -C lua51/src CC=$(CXX) a
all-recursive: lua51/src/liblua.a

View file

@ -5,13 +5,13 @@ SUBDIRS = bitmaps posix
bin_PROGRAMS = aegisub
SVNREV := $(strip $(shell grep revision= .svn/entries 2>/dev/null | cut -d \" -f 2))
SVNREV := $(strip $(shell grep -m 1 revision= .svn/entries 2>/dev/null | cut -d \" -f 2))
DARCSREV := $(strip $(shell head -n 1 ../_darcs/inventory 2>/dev/null))
REVISION := $(if $(SVNREV),-DBUILD_SVN_REVISION=$(SVNREV)) $(if $(DARCSREV),-DBUILD_DARCS)
BUILDINFO := -DBUILD_CREDIT="\"$(shell whoami)\"" $(REVISION)
AM_CPPFLAGS = -Iposix -include posix/defines.h $(BUILDINFO)
LDADD = posix/libposix.a
LDADD = posix/libposix.a ../lua51/src/liblua.a
aegisub_SOURCES = \
aegisublocale.cpp \
ass_attachment.cpp \
@ -42,6 +42,7 @@ aegisub_SOURCES = \
avisynth_wrap.cpp \
base_grid.cpp \
colorspace.cpp \
colour_button.cpp \
dialog_about.cpp \
dialog_attachments.cpp \
dialog_automation.cpp \

View file

@ -19,18 +19,34 @@ typedef int64_t __int64;
typedef uint64_t __uint64;
#define abs64 llabs
#define NO_SPELLCHECKER
#define NO_FEX
#define NO_PRS
#if defined(HAVE_LIBAVCODEC) && defined(HAVE_LIBAVFORMAT)
#define USE_LAVC
#define USE_LAVC 1
#endif
#if defined(HAVE_ASA) && defined(HAVE_ASA_H)
#define USE_ASA
#define USE_ASA 1
#endif
#if defined(HAVE_LIBSSA) && defined(HAVE_LIBSSA_LIBSSA_H)
#define USE_LIBSSA
#define USE_LIBSSA 1
#endif
#ifdef HAVE_LIBPORTAUDIO
#define USE_PORTAUDIO 1
#else
#error no audio system available
#endif
#define USE_DIRECTSHOW 0
#define USE_DIRECTSOUND 0
#define USE_HUNSPELL 0
#ifndef USE_LAVC
#define USE_LAVC 0
#endif
#define USE_PRS 0
#define USE_FEXTRACKER 0
#ifndef USE_LIBSSA
#define USE_LIBSSA 0
#endif
#ifndef USE_ASA
#define USE_ASA 0
#endif
#include "res.h"

View file

@ -819,7 +819,7 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) {
// Build menu
for (int i=0;i<nSugs;i++) {
wxMenuItem *itm = menu.Append(EDIT_MENU_SUGGESTIONS+i,sugs[i]);
#if wxCHECK_VERSION(2, 8, 0)
#if wxCHECK_VERSION(2, 8, 0) && defined(__WINDOWS__)
itm->SetFont(font);
#endif
}

View file

@ -45,6 +45,7 @@ AC_DEFUN([AC_CXX_FLAG], [{
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_LANG(C++)
AC_PROG_RANLIB
AC_PATH_PROGS(CONVERT, [convert], [])
@ -82,11 +83,27 @@ fi
CPPFLAGS="$CPPFLAGS `$WXCONFIG --cppflags | sed -e 's/-fno-exceptions//'` $FREETYPE_CFLAGS"
LIBS="$LIBS `$WXCONFIG --libs` $FREETYPE_LIBS"
AC_ARG_WITH(wxscintilla,
AC_HELP_STRING([--with-wxscintilla=DIR], [Use wxScintilla includes from DIR/include and libraries from DIR/lib.]),
[
if test "$withval" != "yes" -a "$withval" != ""; then
WXSCINTDIR=$withval
if test "${WXSCINTDIR#/}" == "$WXSCINTDIR";
then WXSCINTDIR="`pwd`/$WXSCINTDIR"
fi
CPPFLAGS="$CPPFLAGS -I$WXSCINTDIR/include"
LDFLAGS="$LDFLAGS -L$WXSCINTDIR/lib -Wl,-rpath,$WXSCINTDIR/lib"
fi
],, [
#include <wx/buffer.h>
])
AC_CHECK_HEADER([wx/wxscintilla.h],, [AC_MSG_ERROR([wxScintilla includes not found.])])
LIBS="$LIBS -lwxscintilla"
AC_CHECK_LIB([m], [main])
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_HEADERS([lua.h lua51/lua.h lua5.1/lua.h])
AC_SEARCH_LIBS([lua_newstate], [lua lua51 lua5.1],, [AC_MSG_ERROR([lua 5.1 not found.])])
AC_CHECK_LIB([portaudio], [Pa_Initialize],, [AC_MSG_ERROR([portaudio not found.])])
AC_CHECK_LIB([avcodec], [avcodec_init])
AC_CHECK_LIB([avformat], [av_read_frame])