2010-01-02 11:56:01 -05:00
|
|
|
# Process this file with autogen.sh to produce a configure script.
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2011-03-31 19:42:32 -04:00
|
|
|
AC_INIT(supertuxkart,SVN)
|
2007-05-27 12:01:53 -04:00
|
|
|
AC_CONFIG_SRCDIR([src/main.cpp])
|
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
AC_PREREQ(2.61)
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ================================================
|
|
|
|
# Initialize the automake stuff
|
|
|
|
# set the $host variable based on local machine/os
|
|
|
|
# ================================================
|
2009-01-02 14:34:38 -05:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AM_INIT_AUTOMAKE([foreign tar-ustar])
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2008-01-12 18:08:27 -05:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# =====================================================
|
|
|
|
# Set the default CFLAGS/CXXFLAGS
|
|
|
|
# If these were not set, the AC_PROG_CC and AC_PROG_CXX
|
|
|
|
# scripts set them to "-g -O2".
|
|
|
|
# =====================================================
|
2008-01-21 14:04:00 -05:00
|
|
|
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes"
|
2009-01-02 14:34:38 -05:00
|
|
|
CXXFLAGS="$CXXFLAGS -Wall"
|
2008-01-12 18:08:27 -05:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ===================
|
|
|
|
# Check for compilers
|
|
|
|
# ===================
|
2007-05-27 12:01:53 -04:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_CXX
|
2009-01-02 14:34:38 -05:00
|
|
|
|
|
|
|
# This macro defines WORDS_BIGENDIAN if building for a big endian machine.
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
|
2008-01-14 16:00:15 -05:00
|
|
|
AC_LANG(C++)
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2008-01-12 19:50:59 -05:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ===========================
|
|
|
|
# Check for `configure' flags
|
|
|
|
# ===========================
|
2008-01-12 18:08:27 -05:00
|
|
|
SUMMARY="\nSummary of optional components:\n==============================="
|
2008-01-21 14:04:00 -05:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug,
|
|
|
|
[enable debugging info])])
|
2008-01-21 14:04:00 -05:00
|
|
|
if test x$enable_debug = xyes; then
|
2009-01-02 14:34:38 -05:00
|
|
|
AC_DEFINE([DEBUG], [], [enable debugging cheats and shortcuts])
|
2008-01-21 14:04:00 -05:00
|
|
|
CFLAGS="$CFLAGS -g -pg"
|
|
|
|
CXXFLAGS="$CXXFLAGS -g -pg"
|
|
|
|
SUMMARY="$SUMMARY\nEnabled debugging, please disable for a release!!"
|
2008-05-04 21:30:15 -04:00
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DNDEBUG"
|
|
|
|
CXXFLAGS="$CXXFLAGS -DNDEBUG"
|
|
|
|
SUMMARY="$SUMMARY\nDisabled debugging, asserts have been turned off"
|
2008-01-21 14:04:00 -05:00
|
|
|
fi
|
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
AC_ARG_ENABLE(optimization, [AS_HELP_STRING(--disable-optimization,
|
|
|
|
[disable compiler optimizations])],,
|
2008-01-21 14:04:00 -05:00
|
|
|
enable_optimization=yes)
|
|
|
|
if test x$enable_optimization = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -O2"
|
|
|
|
CXXFLAGS="$CXXFLAGS -O2"
|
|
|
|
else
|
|
|
|
SUMMARY="$SUMMARY\nDisabled compiler optimizations."
|
|
|
|
fi
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ===================
|
|
|
|
# Checks for programs.
|
|
|
|
# ===================
|
2007-05-27 12:01:53 -04:00
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ===============================
|
|
|
|
# Check for MS Windows environment
|
|
|
|
# ================================
|
2007-05-27 12:01:53 -04:00
|
|
|
AC_CHECK_HEADER(windows.h)
|
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ==================================
|
|
|
|
# check for OpenGL related libraries
|
|
|
|
# ==================================
|
2007-05-27 12:01:53 -04:00
|
|
|
case "${host}" in
|
|
|
|
*darwin*|*macosx*)
|
|
|
|
opengl_LIBS="$LIBS -framework Carbon -framework OpenGL -framework IOKit -framework AGL"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*-*-cygwin* | *-*-mingw32*)
|
2010-01-02 11:56:01 -05:00
|
|
|
# CygWin under Windoze.
|
2007-05-27 12:01:53 -04:00
|
|
|
|
|
|
|
echo Win32 specific hacks...
|
|
|
|
AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
|
|
|
|
AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
|
|
|
|
|
2010-02-22 07:02:13 -05:00
|
|
|
opengl_LIBS="-lopengl32 -luser32 -lgdi32 -lm -lwinmm"
|
2007-05-27 12:01:53 -04:00
|
|
|
joystick_LIBS="$joystick_LIBS -lwinmm"
|
2009-01-29 22:34:04 -05:00
|
|
|
LDFLAGS="$LDFLAGS -mwindows"
|
2007-05-27 12:01:53 -04:00
|
|
|
|
|
|
|
echo "Will link apps with $LIBS"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2010-01-02 11:56:01 -05:00
|
|
|
# X-Windows based machines
|
2007-05-27 12:01:53 -04:00
|
|
|
|
|
|
|
save_LIBS=$LIBS
|
|
|
|
AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
|
|
|
|
opengl_LIBS="$LIBS"
|
|
|
|
LIBS=$save_LIBS
|
|
|
|
if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
|
2010-01-02 11:56:01 -05:00
|
|
|
# if GLcore found, then also check for GL
|
2007-05-27 12:01:53 -04:00
|
|
|
AC_SEARCH_LIBS(glXCreateContext, GL)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ========================================
|
|
|
|
# check for OpenAL libraries
|
|
|
|
# ========================================
|
2009-01-02 14:34:38 -05:00
|
|
|
save_LIBS=$LIBS
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
case "${host}" in
|
|
|
|
*darwin*|*macosx*)
|
2009-01-06 12:15:51 -05:00
|
|
|
# search for OpenAL installed in a UNIX way first. This is necessary since OS X 10.4
|
|
|
|
# comes with an OpenAL framework that's too old, so to retain 10.4 support we need to
|
|
|
|
# build OpenAL from source, and can't use Apple's framework.
|
|
|
|
AC_SEARCH_LIBS(alGenBuffers, [openal alut], have_al_lib=yes)
|
|
|
|
|
|
|
|
# We couldn't find OpenAL installed the UNIX way, so fall back to using frameworks
|
|
|
|
if test x$have_al_lib != xyes; then
|
|
|
|
LIBS="-framework OpenAL $LIBS"
|
|
|
|
have_al_lib=yes
|
|
|
|
fi
|
2009-01-02 14:34:38 -05:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_SEARCH_LIBS(alGenBuffers, [openal alut], have_al_lib=yes)
|
|
|
|
;;
|
|
|
|
esac
|
2007-05-27 12:01:53 -04:00
|
|
|
|
|
|
|
if test x$have_al_lib = xyes; then
|
2009-01-02 14:34:38 -05:00
|
|
|
# Apple has the headers in OpenAL/al.h instead of AL/al.h
|
|
|
|
AC_CHECK_HEADERS([AL/al.h OpenAL/al.h], have_al_hdr=yes)
|
2007-05-27 12:01:53 -04:00
|
|
|
fi
|
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
if test x$have_al_hdr != xyes; then
|
|
|
|
AC_MSG_ERROR([[cannot find useable OpenAL installation. You need to install OpenAL.]])
|
|
|
|
fi
|
2008-05-25 16:30:25 -04:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
openal_LIBS="$LIBS"
|
|
|
|
LIBS="$save_LIBS"
|
2008-05-25 16:30:25 -04:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
# ====================
|
|
|
|
# check for Ogg Vorbis
|
|
|
|
# ====================
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
save_LIBS=$LIBS
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2010-01-17 17:51:32 -05:00
|
|
|
# also check in /usr/local
|
|
|
|
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# search for the libraries needed to use ogg vorbis
|
2010-04-21 11:37:36 -04:00
|
|
|
AC_SEARCH_LIBS(ov_open, [vorbisfile], have_vorbisfile_lib=yes, have_vorbisfile_lib=no, [-lvorbis])
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
if test x$have_vorbisfile_lib = xyes; then
|
2010-01-02 11:56:01 -05:00
|
|
|
# check for the headers needed by ogg vorbis
|
2009-01-02 14:34:38 -05:00
|
|
|
AC_CHECK_HEADER(vorbis/vorbisfile.h, have_vorbisfile_hdr=yes)
|
|
|
|
AC_CHECK_HEADER(ogg/ogg.h, have_ogg_hdr=yes)
|
|
|
|
fi
|
|
|
|
SUMMARY="$SUMMARY\n"
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
if test x$have_vorbisfile_hdr = xyes -a x$have_ogg_hdr = xyes; then
|
|
|
|
AC_DEFINE([HAVE_OGGVORBIS], 1, [Defined when Ogg Vorbis is available])
|
|
|
|
SUMMARY="$SUMMARY\nWe have Ogg Vorbis support."
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([[cannot find useable Ogg Vorbis installation. You need to install libogg and libvorbis.]])
|
|
|
|
#SUMMARY="$SUMMARY\nNo Ogg Vorbis support - the game will play with sound effects, but without music."
|
|
|
|
#SUMMARY="$SUMMARY\nPlease install ogg vorbis!"
|
|
|
|
fi
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2009-01-02 14:34:38 -05:00
|
|
|
oggvorbis_LIBS="$LIBS"
|
|
|
|
LIBS=$save_LIBS
|
2007-05-27 12:01:53 -04:00
|
|
|
|
|
|
|
# The following are C++ items that need to be tested for with the c++
|
|
|
|
# compiler
|
|
|
|
AC_LANG_PUSH(C++)
|
|
|
|
|
|
|
|
|
2010-04-21 11:37:36 -04:00
|
|
|
# ==================
|
|
|
|
# Check for irrlicht
|
|
|
|
# ==================
|
2009-10-07 00:56:17 -04:00
|
|
|
AC_ARG_WITH(irrlicht, [AS_HELP_STRING(--with-irrlicht=PREFIX,
|
|
|
|
[specify the prefix path to irrlicht])])
|
|
|
|
if test "x$with_irrlicht" != "x" ; then
|
2010-01-17 17:51:32 -05:00
|
|
|
CPPFLAGS="${CPPFLAGS} -I $with_irrlicht/include -I $with_irrlicht/include/irrlicht"
|
2009-10-07 00:56:17 -04:00
|
|
|
AC_CHECK_HEADER(irrlicht.h, have_irrlicht_hdr=yes)
|
|
|
|
if test x$have_irrlicht_hdr != xyes; then
|
2011-10-26 21:31:04 -04:00
|
|
|
AC_MSG_ERROR([Can not find irrlicht in $with_irrlicht.])
|
2009-03-04 19:36:18 -05:00
|
|
|
fi
|
2009-10-07 00:56:17 -04:00
|
|
|
else
|
2010-01-17 18:27:53 -05:00
|
|
|
CPPFLAGS_Save=$CPPFLAGS
|
|
|
|
|
2010-01-17 18:19:51 -05:00
|
|
|
# check in /usr
|
2010-01-17 18:27:53 -05:00
|
|
|
echo " in /usr/ : "
|
|
|
|
|
|
|
|
CPPFLAGS="${CPPFLAGS_Save} -I/usr/include/irrlicht"
|
|
|
|
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr=yes, irrlicht_found_in_usr=no)
|
2010-01-17 15:12:34 -05:00
|
|
|
|
2010-01-17 18:19:51 -05:00
|
|
|
# if it's not found there, try /usr/local instead
|
|
|
|
if test x$irrlicht_found_in_usr == xyes; then
|
2010-01-17 15:12:34 -05:00
|
|
|
with_irrlicht="/usr"
|
2010-01-17 18:19:51 -05:00
|
|
|
else
|
|
|
|
|
|
|
|
# I'd like to fall back to check /usr/local second, but stupid autotools does not support
|
|
|
|
# checking for a header in 2 directories because it caches results
|
2010-01-17 18:27:53 -05:00
|
|
|
#AC_MSG_ERROR([Can't find irrlicht installation in /usr, use --with-irrlicht...])
|
|
|
|
|
|
|
|
# erase cached result
|
|
|
|
unset ac_cv_header_irrlicht_h
|
|
|
|
|
|
|
|
echo " in /usr/local/ : "
|
|
|
|
CPPFLAGS="${CPPFLAGS_Save} -I/usr/local/include/irrlicht"
|
|
|
|
AC_CHECK_HEADER(irrlicht.h, irrlicht_found_in_usr_local=yes, irrlicht_found_in_usr_local=no)
|
2010-01-17 15:12:34 -05:00
|
|
|
|
2010-01-17 18:27:53 -05:00
|
|
|
if test x$irrlicht_found_in_usr_local == xyes; then
|
|
|
|
with_irrlicht="/usr/local"
|
|
|
|
else
|
2011-10-26 21:31:04 -04:00
|
|
|
AC_MSG_ERROR([Can not find irrlicht installation in standard prefixes, use --with-irrlicht...])
|
2010-01-17 18:27:53 -05:00
|
|
|
fi
|
2009-03-04 19:36:18 -05:00
|
|
|
fi
|
2010-01-17 18:19:51 -05:00
|
|
|
|
2010-01-17 18:27:53 -05:00
|
|
|
CPPFLAGS="${CPPFLAGS_Save} -I ${with_irrlicht}/include/irrlicht"
|
2010-01-17 18:19:51 -05:00
|
|
|
|
2009-10-07 00:56:17 -04:00
|
|
|
fi
|
2010-01-17 15:12:34 -05:00
|
|
|
|
2009-10-07 00:56:17 -04:00
|
|
|
case "${host}" in
|
|
|
|
*-*-linux* )
|
2011-11-15 17:14:41 -05:00
|
|
|
irrlicht_LIBS="-L/$with_irrlicht/lib/Linux -L/$with_irrlicht/lib -lIrrlicht -lX11 -lpthread"
|
2009-10-07 00:56:17 -04:00
|
|
|
;;
|
|
|
|
*darwin*|*macosx*)
|
2010-04-21 11:37:36 -04:00
|
|
|
irrlicht_LIBS="-L/$with_irrlicht/lib/ -lIrrlicht -framework Cocoa"
|
2009-10-07 00:56:17 -04:00
|
|
|
;;
|
2009-10-22 19:28:57 -04:00
|
|
|
*freebsd*)
|
2010-04-21 11:37:36 -04:00
|
|
|
irrlicht_LIBS="-L/$with_irrlicht/lib/ -lIrrlicht -lpthread"
|
2009-10-07 00:56:17 -04:00
|
|
|
esac
|
2009-03-05 16:05:26 -05:00
|
|
|
|
2010-04-21 11:37:36 -04:00
|
|
|
# ---- Check these flags do work by building a small irrLicht sample
|
|
|
|
echo "checking for irrlicht libraries..."
|
2009-10-07 00:56:17 -04:00
|
|
|
save_LIBS=$LIBS
|
|
|
|
LIBS="$LIBS $irrlicht_LIBS $opengl_LIBS"
|
2009-10-07 08:45:29 -04:00
|
|
|
|
2010-04-21 11:37:36 -04:00
|
|
|
irrlicht_sample_built_fine="false"
|
|
|
|
|
|
|
|
AC_TRY_RUN(
|
|
|
|
[
|
|
|
|
# include "irrlicht.h"
|
|
|
|
int main() {
|
|
|
|
irr::createDevice(irr::video::EDT_NULL);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
],
|
|
|
|
irrlicht_sample_built_fine="true",
|
|
|
|
irrlicht_sample_built_fine="false"
|
|
|
|
)
|
|
|
|
|
2009-10-07 08:45:29 -04:00
|
|
|
case "${host}" in
|
|
|
|
*-*-linux* )
|
2010-01-02 11:56:01 -05:00
|
|
|
# If base irrLicht flags failed, try again with Xxf86vm
|
|
|
|
# FIXME: this program when run prints out two lines (version numbers) to stdout
|
|
|
|
if test x$irrlicht_sample_built_fine = xfalse; then
|
|
|
|
LIBS="$LIBS -lXxf86vm"
|
|
|
|
works_with_Xxf86vm="false"
|
|
|
|
AC_TRY_RUN([
|
|
|
|
# include "irrlicht.h"
|
|
|
|
int main() {
|
|
|
|
irr::createDevice(irr::video::EDT_NULL);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
],
|
2010-01-02 11:58:19 -05:00
|
|
|
works_with_Xxf86vm="true",
|
|
|
|
)
|
2010-01-02 11:56:01 -05:00
|
|
|
|
|
|
|
if test x$works_with_Xxf86vm = xtrue; then
|
|
|
|
irrlicht_LIBS="$irrlicht_LIBS -lXxf86vm"
|
2010-01-02 11:58:19 -05:00
|
|
|
irrlicht_sample_built_fine="true"
|
2010-01-02 11:56:01 -05:00
|
|
|
fi
|
|
|
|
fi
|
2009-10-07 08:45:29 -04:00
|
|
|
;;
|
|
|
|
esac
|
2010-04-21 11:37:36 -04:00
|
|
|
|
|
|
|
if test x$irrlicht_sample_built_fine = xfalse; then
|
2011-10-26 21:31:04 -04:00
|
|
|
AC_MSG_ERROR([Cann not build test irrLicht program. Check config.log to see the errors])
|
2010-04-21 11:37:36 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
# ---- Check we have the minimum required irrLicht version
|
|
|
|
echo -n "checking irrlicht version is recent enough... "
|
|
|
|
|
|
|
|
irrlicht_min_version_met="false"
|
|
|
|
|
2010-09-14 22:55:47 -04:00
|
|
|
# Note that irrlicht 1.8 potentially needs additional flags (-lXcursor, or
|
|
|
|
# undefine _IRR_LINUX_XCURSOR_ # in IrrCompileConfig.h). Since there might
|
|
|
|
# be other changes, for now I remove support for irrlicht trunk/1.8
|
|
|
|
|
2010-04-21 11:37:36 -04:00
|
|
|
AC_TRY_RUN(
|
|
|
|
[
|
|
|
|
# include "irrlicht.h"
|
|
|
|
int main() {
|
2010-09-14 22:55:47 -04:00
|
|
|
#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR == 7)
|
2011-03-31 19:42:32 -04:00
|
|
|
#error "STK needs irrlicht 1.8* to work properly (which might be only available"
|
|
|
|
#error "as svn trunk atm"
|
2010-04-21 11:37:36 -04:00
|
|
|
#else
|
2011-03-31 19:42:32 -04:00
|
|
|
// ok
|
2010-04-21 11:37:36 -04:00
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
],
|
|
|
|
irrlicht_min_version_met="true",
|
|
|
|
irrlicht_min_version_met="false"
|
|
|
|
)
|
|
|
|
|
|
|
|
if test x$irrlicht_min_version_met = xfalse; then
|
2011-03-31 19:42:32 -04:00
|
|
|
AC_MSG_ERROR([Your irrLicht is too old, please update irrLicht.
|
|
|
|
You need irrlicht 1.8.
|
2011-07-15 07:36:41 -04:00
|
|
|
While irrlicht 1.8 is not released, we recommend using version 3843 from irrlicht SVN trunk.])
|
2010-04-21 11:37:36 -04:00
|
|
|
else
|
|
|
|
echo "yes"
|
|
|
|
fi
|
2009-10-07 08:45:29 -04:00
|
|
|
|
2009-10-07 00:56:17 -04:00
|
|
|
LIBS=$save_LIBS
|
2009-03-04 19:36:18 -05:00
|
|
|
|
2010-06-12 13:18:28 -04:00
|
|
|
# ==================
|
|
|
|
# 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
|
|
|
|
|
2011-03-27 18:00:30 -04:00
|
|
|
# Libcurl is needed in all build modes
|
|
|
|
PKG_CHECK_MODULES(LIBCURL, libcurl >= 0.1)
|
2010-06-12 13:18:28 -04:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ======================================================
|
|
|
|
# Try to supply the SVN revision number for the compiler
|
|
|
|
# ======================================================
|
2007-05-27 12:01:53 -04:00
|
|
|
AC_CHECK_PROGS(have_svnversion,[svnversion],"no")
|
|
|
|
if test x$have_svnversion != xno; then
|
2009-01-02 14:34:38 -05:00
|
|
|
SVNVERSION="`svnversion $srcdir`"
|
2007-05-27 12:01:53 -04:00
|
|
|
AC_DEFINE_UNQUOTED([SVNVERSION],"$SVNVERSION",["SVN revision number"])
|
|
|
|
fi
|
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ==============
|
|
|
|
# Bullet physics
|
|
|
|
# ==============
|
2008-02-01 08:35:37 -05:00
|
|
|
AC_DEFINE([BT_NO_PROFILE], [], [Disable bullet internal profiling])
|
2007-12-08 08:04:56 -05:00
|
|
|
BULLETTREE="src/bullet"
|
2010-02-22 07:02:13 -05:00
|
|
|
bullet_LIBS="-Lbullet/src -lbulletdynamics -lbulletcollision -lbulletmath"
|
2008-01-06 17:03:04 -05:00
|
|
|
|
2007-11-05 08:38:57 -05:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ====
|
|
|
|
# enet
|
|
|
|
# ====
|
2008-09-07 11:04:43 -04:00
|
|
|
AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
|
|
|
|
AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
|
|
|
|
AC_CHECK_FUNC(poll, [AC_DEFINE(HAS_POLL)])
|
|
|
|
AC_CHECK_FUNC(fcntl, [AC_DEFINE(HAS_FCNTL)])
|
|
|
|
AC_CHECK_FUNC(inet_pton, [AC_DEFINE(HAS_INET_PTON)])
|
|
|
|
AC_CHECK_FUNC(inet_ntop, [AC_DEFINE(HAS_INET_NTOP)])
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct msghdr.msg_flags, [AC_DEFINE(HAS_MSGHDR_FLAGS)], , [#include <sys/socket.h>])
|
|
|
|
|
|
|
|
AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], ,
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
|
|
|
|
AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
|
|
|
|
|
2009-01-15 20:30:42 -05:00
|
|
|
case "${host}" in
|
|
|
|
*-*-cygwin* | *-*-mingw32*)
|
|
|
|
enet_LIBS="-Lenet -lenet -lws2_32"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
enet_LIBS="-Lenet -lenet"
|
|
|
|
;;
|
|
|
|
esac
|
2008-09-07 11:04:43 -04:00
|
|
|
ENETTREE="src/enet"
|
|
|
|
|
2010-08-29 20:30:18 -04:00
|
|
|
# ==========================================
|
|
|
|
# Check for a known compiler bug, details in
|
|
|
|
# src/bullet/src/Makefile.am
|
|
|
|
# ==========================================
|
|
|
|
ORIGCXXFLAGS="$CXXFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS -fno-elide-constructors"
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
|
|
|
|
AC_MSG_RESULT(yes); NOELIDE=-fno-elide-constructors,
|
|
|
|
AC_MSG_RESULT(no); NOELIDE="")
|
|
|
|
CXXFLAGS="$ORIGCXXFLAGS"
|
|
|
|
AC_SUBST(NOELIDE)
|
|
|
|
|
2008-09-07 11:04:43 -04:00
|
|
|
# =========================
|
|
|
|
# subst bars in Makefile.am
|
|
|
|
# =========================
|
2010-06-30 13:07:42 -04:00
|
|
|
|
2009-03-04 19:36:18 -05:00
|
|
|
AC_SUBST(irrlicht_LIBS)
|
2010-06-12 13:18:28 -04:00
|
|
|
AC_SUBST(fribidi_LIBS)
|
2008-09-07 11:04:43 -04:00
|
|
|
AC_SUBST(bullet_LIBS)
|
|
|
|
AC_SUBST(enet_LIBS)
|
|
|
|
AC_SUBST(opengl_LIBS)
|
|
|
|
AC_SUBST(openal_LIBS)
|
2009-01-02 14:34:38 -05:00
|
|
|
AC_SUBST(oggvorbis_LIBS)
|
2007-11-05 08:38:57 -05:00
|
|
|
AC_SUBST(BULLETTREE)
|
2008-09-07 11:04:43 -04:00
|
|
|
AC_SUBST(ENETTREE)
|
2007-05-27 12:01:53 -04:00
|
|
|
|
2010-01-02 11:56:01 -05:00
|
|
|
# ================
|
|
|
|
# Create makefiles
|
|
|
|
# ================
|
2008-04-17 01:34:45 -04:00
|
|
|
AC_CONFIG_FILES([ \
|
|
|
|
Makefile \
|
|
|
|
data/Makefile \
|
2011-01-16 22:39:52 -05:00
|
|
|
data/challenges/Makefile \
|
2008-04-17 01:34:45 -04:00
|
|
|
data/fonts/Makefile \
|
2011-01-16 22:39:52 -05:00
|
|
|
data/gfx/Makefile \
|
2008-09-09 20:26:04 -04:00
|
|
|
data/grandprix/Makefile \
|
2009-12-13 21:37:33 -05:00
|
|
|
data/gui/Makefile \
|
2008-04-17 01:34:45 -04:00
|
|
|
data/karts/Makefile \
|
|
|
|
data/models/Makefile \
|
|
|
|
data/music/Makefile \
|
|
|
|
data/po/Makefile \
|
2011-09-06 02:09:27 -04:00
|
|
|
data/shaders/Makefile \
|
2008-04-17 01:34:45 -04:00
|
|
|
data/sfx/Makefile \
|
|
|
|
data/textures/Makefile \
|
|
|
|
data/tracks/Makefile \
|
2011-09-06 02:09:27 -04:00
|
|
|
data/tutorials/Makefile \
|
2008-04-17 01:34:45 -04:00
|
|
|
doc/Makefile \
|
|
|
|
src/Makefile \
|
2009-01-02 14:34:38 -05:00
|
|
|
src/ide/Makefile \
|
2008-04-17 01:34:45 -04:00
|
|
|
src/bullet/Makefile \
|
|
|
|
src/bullet/src/Makefile \
|
2008-09-07 11:04:43 -04:00
|
|
|
src/enet/Makefile \
|
2011-09-06 02:09:27 -04:00
|
|
|
tools/Makefile
|
2007-05-27 12:01:53 -04:00
|
|
|
])
|
|
|
|
AC_OUTPUT
|
|
|
|
echo -e $SUMMARY
|