diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index d7090aa53..a73bf1024 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -11,7 +11,7 @@ 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 = -DAEGISUB -Iposix -include posix/defines.h $(BUILDINFO) +AM_CPPFLAGS = -DAEGISUB -Iposix $(RUBY_CFLAGS) -include posix/defines.h $(BUILDINFO) LDADD = posix/libposix.a ../lua51/src/liblua.a ../FexTrackerSource/libfex.a ../csri/lib/.libs/libcsri.a -lGL -lGLU if USE_LIBASS @@ -20,9 +20,17 @@ else LIBASS= endif -# auto4_ruby_assfile.cpp -# auto4_ruby.cpp -# auto4_ruby_dialog.cpp +if HAVE_PORTAUDIO +PORTAUDIO=audio_player_portaudio.cpp +else +PORTAUDIO= +endif + +#if HAVE_RUBY +#AUTO4RUBY=auto4_ruby_assfile.cpp auto4_ruby.cpp auto4_ruby_dialog.cpp +#else +#AUTO4RUBY= +#endif aegisub_SOURCES = \ aegisublocale.cpp \ @@ -40,7 +48,7 @@ aegisub_SOURCES = \ audio_display.cpp \ audio_karaoke.cpp \ audio_player.cpp \ - audio_player_portaudio.cpp \ + $(PORTAUDIO) \ audio_provider.cpp \ audio_provider_hd.cpp \ audio_provider_lavc.cpp \ @@ -52,6 +60,7 @@ aegisub_SOURCES = \ auto4_lua_assfile.cpp \ auto4_lua_dialog.cpp \ auto4_auto3.cpp \ + $(AUTO4RUBY) \ avisynth_wrap.cpp \ base_grid.cpp \ browse_button.cpp \ diff --git a/aegisub/posix/defines.h b/aegisub/posix/defines.h index 726211774..42dc9cb51 100644 --- a/aegisub/posix/defines.h +++ b/aegisub/posix/defines.h @@ -22,35 +22,22 @@ typedef int64_t __int64; typedef uint64_t __uint64; #define abs64 llabs -#if defined(HAVE_LIBAVCODEC) && defined(HAVE_LIBAVFORMAT) -#define USE_LAVC 1 -#endif +/* #if defined(HAVE_ASA) && defined(HAVE_ASA_H) #define USE_ASA 1 #endif #if defined(HAVE_LIBSSA) && defined(HAVE_LIBSSA_LIBSSA_H) #define USE_LIBSSA 1 #endif -#ifdef HAVE_LIBPORTAUDIO -#define USE_PORTAUDIO 1 -#else -#error no audio system available -#endif -//#define USE_HUNSPELL 0 -#ifndef USE_LAVC -#define USE_LAVC 0 -#endif #define USE_PRS 0 #ifndef USE_FEXTRACKER -#define USE_FEXTRACKER 1 -#endif -#ifndef USE_LIBSSA -#define USE_LIBSSA 0 +#define USE_FEXTRACKER 0 #endif #ifndef USE_ASA #define USE_ASA 0 #endif +*/ #include "res.h" diff --git a/configure.ac b/configure.ac index 4c391d841..254b87257 100644 --- a/configure.ac +++ b/configure.ac @@ -66,11 +66,12 @@ ACX_PTHREAD([], [ AC_MSG_FAILURE([Aegisub needs pthreads]) ]) -AC_CHECK_LIB([portaudio], [Pa_Initialize],, [AC_MSG_ERROR([portaudio not found.])]) +AC_CHECK_LIB([portaudio], [Pa_Initialize],, [with_portaudio=no]) AC_CHECK_FUNCS([Pa_GetStreamTime]) AC_CHECK_LIB([avcodec], [avcodec_init],, [AC_MSG_ERROR([avcodec not found.])]) AC_CHECK_LIB([avformat], [av_read_frame],, [AC_MSG_ERROR([avformat not found.])]) AC_CHECK_LIB([hunspell], [main],, [AC_MSG_ERROR([Hunspell not found.])]) +# AC_CHECK_LIB([ruby1.9], [ruby_init],, [with_ruby=no]) AC_CHECK_HEADER([wchar.h],,[ AC_MSG_FAILURE([aegisub needs wide character support, find a wchar.h]) @@ -204,6 +205,8 @@ AC_HEADER_STDBOOL AC_CONFIG_SUBDIRS([csri]) AM_CONDITIONAL([USE_LIBASS], [test "$with_libass" != "no" ]) +AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"]) +#AM_CONDITIONAL([HAVE_RUBY], [test "$with_ruby" != "no"]) AC_OUTPUT([ Makefile