From b7af0a06d5b514615e7daa4d9949a67a35a76e0b Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Wed, 26 Mar 2008 23:58:39 +0000 Subject: [PATCH] * Add a detection for platform/arch. * Add a new condtitional BUILD_DARWIN for fontconfig/freetype font listing support. Originally committed to SVN as r2150. --- aegisub/Makefile.am | 9 +++++++-- configure.in | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index 38e9c7b28..b4395d474 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -103,11 +103,18 @@ else UNIVCHARSET = charset_detect.cpp text_file_reader.cpp endif +if BUILD_DARWIN + font_lister = font_file_lister_freetype.cpp +else + font_lister = font_file_lister_fontconfig.cpp +endif ## These aren't built, but are listed here so 'make dist' can always find all the sources ## This should also list all Win32 specific files EXTRA_aegisub_SOURCES = \ + font_file_lister.cpp \ + $(font_lister) \ audio_player_dsound.cpp \ audio_player_portaudio.cpp \ audio_player_pulse.cpp \ @@ -205,8 +212,6 @@ aegisub_SOURCES = \ export_framerate.cpp \ export_visible_lines.cpp \ fft.cpp \ - font_file_lister.cpp \ - font_file_lister_fontconfig.cpp \ frame_main.cpp \ frame_main_events.cpp \ gl_text.cpp \ diff --git a/configure.in b/configure.in index f0f03dac5..38a188d2a 100644 --- a/configure.in +++ b/configure.in @@ -34,6 +34,30 @@ AC_CONFIG_HEADER([aegisub/posix/acconf.h]) AC_GNU_SOURCE AC_CANONICAL_HOST +########################### +# Check target architecture +########################### + +AC_MSG_CHECKING([for target architecture]) +case x"$target" in + xNONE | x) + target_or_host="$host" ;; + *) + target_or_host="$target" ;; +esac +AC_MSG_RESULT([$target_or_host]) + +case "$target_or_host" in + *-*-darwin*) + build_darwin="yes" + ;; + + *) + ;; +esac + +AM_CONDITIONAL([BUILD_DARWIN], [test "$build_darwin" = "yes"]) + ######################## # Configurable variables