Added autotools support for fribidi (hopefully it works, please folks help me test with and without\!)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5501 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-06-12 17:18:28 +00:00
parent 8fd3563db2
commit 2bcb1d4c17
3 changed files with 33 additions and 2 deletions

View File

@ -318,6 +318,36 @@ fi
LIBS=$save_LIBS
# ==================
# Check for Fribidi
# ==================
save_LIBS=$LIBS
# also check in /usr/local
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
# search for the libraries needed to use ogg vorbis
AC_SEARCH_LIBS(fribidi_log2vis, [fribidi], have_fribidi=yes, have_fribidi=no)
if test x$have_fribidi = xyes; then
AC_CHECK_HEADER(fribidi/fribidi.h, have_fribidi_hdr=yes)
fi
SUMMARY="$SUMMARY\n"
if test x$have_fribidi = xyes -a x$have_fribidi_hdr = xyes; then
AC_DEFINE([ENABLE_BIDI], 1, [Defined when Fribidi is available])
SUMMARY="$SUMMARY\nFribidi (RTL languages support) support enabled."
fribidi_LIBS="$LIBS"
else
SUMMARY="$SUMMARY\nFribidi (RTL languages support) support disabled."
fribidi_LIBS=""
fi
LIBS=$save_LIBS
# ======================================================
# Try to supply the SVN revision number for the compiler
# ======================================================
@ -374,6 +404,7 @@ CHECK_GETTEXT(external)
# subst bars in Makefile.am
# =========================
AC_SUBST(irrlicht_LIBS)
AC_SUBST(fribidi_LIBS)
AC_SUBST(bullet_LIBS)
AC_SUBST(enet_LIBS)
AC_SUBST(opengl_LIBS)

View File

@ -357,7 +357,7 @@ supertuxkart_SOURCES = \
# Link in the specific gcc 4.1 bug work around
supertuxkart_LDADD = \
$(irrlicht_LIBS) $(bullet_LIBS) $(enet_LIBS) \
$(irrlicht_LIBS) $(fribidi_LIBS) $(bullet_LIBS) $(enet_LIBS) \
$(opengl_LIBS) $(openal_LIBS) $(oggvorbis_LIBS) \
$(INTLLIBS)

View File

@ -40,7 +40,7 @@
#include "utils/constants.hpp"
#if ENABLE_BIDI
#include <fribidi.h>
#include <fribidi/fribidi.h>
#endif
// set to 1 to debug i18n