From 244b28ecf100818d84a8e3cbc52305722fde31cd Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 22 Apr 2007 22:20:53 +0000 Subject: [PATCH] Ruby should hopefully work on posix now, but is hopefully optional. Aegisub is a project made of hopes. Originally committed to SVN as r1116. --- aegisub/Makefile.am | 14 ++++++++------ configure.ac | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index 5fe90c901..37a2d310b 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 $(RUBY_CFLAGS) -include posix/defines.h $(BUILDINFO) +AM_CPPFLAGST = -DAEGISUB -Iposix -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 @@ -30,11 +30,13 @@ AUDIO_PLAYER+=audio_player_alsa.cpp LDADD += -lasound endif -#if HAVE_RUBY -#AUTO4RUBY=auto4_ruby_assfile.cpp auto4_ruby.cpp auto4_ruby_dialog.cpp -#else -#AUTO4RUBY= -#endif +if HAVE_RUBY +AUTO4RUBY=auto4_ruby_assfile.cpp auto4_ruby.cpp auto4_ruby_dialog.cpp +AM_CPPFLAGS = $(shell ruby -r rbconfig -e "p '-I' + Config::CONFIG['rubylibdir'] + '/' + Config::CONFIG['arch'] ") $(AM_CPPFLAGST) +else +AUTO4RUBY= +AM_CPPFLAGS = $(AM_CPPFLAGST) +endif if HAVE_HUNSPELL HUNSPELL=spellchecker_hunspell.cpp diff --git a/configure.ac b/configure.ac index 766aac5c0..ad3ee25c6 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,7 @@ 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],, [with_hunspell=no]) -# AC_CHECK_LIB([ruby1.9], [ruby_init],, [with_ruby=no]) +AC_CHECK_LIB([ruby1.9], [ruby_init],, [with_ruby=no]) if test -z "$found_audio"; then AC_MSG_WARN([No audio interface found, Aegisub will be built without Audio support!]) @@ -213,7 +213,7 @@ AM_CONDITIONAL([USE_LIBASS], [test "$with_libass" != "no" ]) AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"]) AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"]) AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_hunspell" != "no"]) -#AM_CONDITIONAL([HAVE_RUBY], [test "$with_ruby" != "no"]) +AM_CONDITIONAL([HAVE_RUBY], [test "$with_ruby" != "no"]) AC_OUTPUT([ Makefile