1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/gcompris/gcompris.c)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(gcompris, 8.2.2)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
# Provide relocatable API from autopackage
# From http://autopackage.org/docs/binreloc/
AM_BINRELOC
# Making releases:
# LIBGCOMPRIS_MICRO_VERSION += 1;
# LIBGCOMPRIS_INTERFACE_AGE += 1;
# if any functions have been added, set LIBGCOMPRIS_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set LIBGCOMPRIS_BINARY_AGE and LIBGCOMPRIS_INTERFACE_AGE to 0.
#
LIBGCOMPRIS_MAJOR_VERSION=1
LIBGCOMPRIS_MINOR_VERSION=0
LIBGCOMPRIS_MICRO_VERSION=0
LIBGCOMPRIS_INTERFACE_AGE=0
# If you need a modifier for the version number.
# Normally empty, but can be used to make "fixup" releases.
LIBGCOMPRIS_EXTRAVERSION=
dnl libtool versioning from libgnome
LIBGCOMPRIS_CURRENT=`expr 100 '*' $LIBGCOMPRIS_MINOR_VERSION + $LIBGCOMPRIS_MICRO_VERSION - $LIBGCOMPRIS_INTERFACE_AGE`
LIBGCOMPRIS_BINARY_AGE=`expr 100 '*' $LIBGCOMPRIS_MINOR_VERSION + $LIBGCOMPRIS_MICRO_VERSION`
LIBGCOMPRIS_REVISION=$LIBGCOMPRIS_INTERFACE_AGE
LIBGCOMPRIS_AGE=`expr $LIBGCOMPRIS_BINARY_AGE - $LIBGCOMPRIS_INTERFACE_AGE`
LIBGCOMPRIS_VERSION=$LIBGCOMPRIS_MAJOR_VERSION.$LIBGCOMPRIS_MINOR_VERSION.$LIBGCOMPRIS_MICRO_VERSION$LIBGCOMPRIS_EXTRAVERSION
AC_SUBST(LIBGCOMPRIS_CURRENT)
AC_SUBST(LIBGCOMPRIS_REVISION)
AC_SUBST(LIBGCOMPRIS_AGE)
AC_ISC_POSIX
GTK_REQUIRED=2.4.0
GDK_PIXBUF_REQUIRED=2.4.0
LIBGNOMECANVAS_REQUIRED=2.3.6
PKG_CHECK_MODULES(GCOMPRIS, gtk+-2.0 >= $GTK_REQUIRED gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED libgnomecanvas-2.0 >= $LIBGNOMECANVAS_REQUIRED gthread-2.0)
AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio,, AC_MSG_ERROR([*** SDL_mixer not found. Visit http://www.libsdl.org and get it]))
AC_SUBST(GCOMPRIS_CFLAGS)
AC_SUBST(GCOMPRIS_LIBS)
AC_HEADER_DIRENT
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_PROG_INTLTOOL
AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl Check for SDL
SDL_VERSION=1.2.3
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
dnl GNOME2 GNOME_X_CHECKS
AM_PATH_GLIB_2_0
dnl libxml-2 Checks
PKG_CHECK_MODULES(XML, libxml-2.0)
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)
dnl glib-genmarshal
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
dnl popt
AC_CHECK_LIB(popt, poptDupArgv,,
AC_MSG_ERROR([You must have popt 1.5 or newer to compile gcompris.]))
AM_ICONV
dnl XF86VidMode allows us to set the screen resolution dynamically
AC_PATH_X
AC_ARG_ENABLE(xf86vidmode,
AC_HELP_STRING(
[--disable-xf86vidmode],
[Turn off xf86vidmode]),
USE_XF86VM="$enableval", USE_XF86VM="yes")
found_xf86vidmode=no
if test "x$USE_XF86VM" == "xyes" ; then
XF86VM_LIBS=
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension,
[AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
XF86VM_LIBS="-L$x_libraries -lXxf86vm" found_xf86vidmode=yes,,
[#include <X11/Xlib.h>])],
, -L$x_libraries $ALL_X_LIBS )
if test "x$found_xf86vidmode" = "xno"; then
AC_MSG_NOTICE(["Suitable XF86VidMode extension library not found - Will not use xf86vidmode for fullscreen."])
else
AC_DEFINE_UNQUOTED(XF86_VIDMODE, 1, [XF86VidMode Available])
fi
fi
LDFLAGS="${LDFLAGS} ${XF86VM_LIBS}"
dnl Add the languages which your application supports here.
ALL_LINGUAS="am ar az bg ca cs da de el en_CA en_GB es et eu fi fr ga gu he hi hr hu it ka lt mk ml mr ms nb ne nl nn pa pl pt pt_BR ro ru rw sk sl so sq sr sr@Latn sv th tr vi wa zh_CN zh_TW"
dnl GCompris needs to know which locale are supported
AC_SUBST(ALL_LINGUAS)
AC_DEFINE_UNQUOTED(ALL_LINGUAS, "${ALL_LINGUAS}", [Supported languages])
GETTEXT_PACKAGE=gcompris
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package name])
BUILD_DATE=`date +%y%m`
AC_DEFINE_UNQUOTED(BUILD_DATE,"$BUILD_DATE", [Date at which GCompris has been built])
AC_SUBST(BUILD_DATE)
dnl Define myprefix depending on wether our user gives us one or not
if test "x${prefix}" = "xNONE"; then
myprefix=${ac_default_prefix}
else
myprefix=${prefix}
fi
dnl Define myprefix depending on wether our user gives us one or not
dnl This is needed for $libdir !
if test "x${exec_prefix}" = "xNONE"; then
exec_prefix=${myprefix}
fi
dnl Some debug option
AC_ARG_ENABLE(debug,
AC_HELP_STRING(
[--enable-debug],
[Turn on debugging messages]),
USE_DEBUG="$enableval", USE_DEBUG="no")
if test "x$USE_DEBUG" == "xyes" ; then
AC_DEFINE_UNQUOTED(DEBUG, 1, "Enable debug messages.")
CFLAGS="$CFLAGS -Wall -Werror -g"
else
CFLAGS="$CFLAGS -Wall -Werror"
fi
dnl WIN32 Specifics
AC_MSG_CHECKING([for native Win32])
case "$host" in
*-*-mingw*)
native_win32=yes
;;
*)
native_win32=no
;;
esac
AC_MSG_RESULT([$native_win32])
AM_CONDITIONAL(OS_WIN32, test "$native_win32" = yes)
AC_MSG_CHECKING([for Win32 platform in general])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT($platform_win32)
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = yes)
# Ensure MSVC-compatible struct packing convention is used when
# compiling for Win32 with gcc. GTK+ uses this convention, so we must, too.
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
# gcc2 uses "-fnative-struct".
if test x"$native_win32" = xyes; then
if test x"$GCC" = xyes; then
msnative_struct=''
AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
if test -z "$ac_cv_prog_CC"; then
our_gcc="$CC"
else
our_gcc="$ac_cv_prog_CC"
fi
case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
2.)
if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
msnative_struct='-fnative-struct'
fi
;;
*)
if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
msnative_struct='-mms-bitfields'
fi
;;
esac
if test x"$msnative_struct" = x ; then
AC_MSG_RESULT([no way])
AC_MSG_WARN([produced libraries will be incompatible with prebuilt GTK+ DLLs])
else
CFLAGS="$CFLAGS $msnative_struct"
AC_MSG_RESULT([${msnative_struct}])
fi
fi
fi
dnl
dnl === DIRECTORY DEFINITIONS ===
dnl
dnl Set PACKAGE_LOCALE_DIR in config.h.
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${myprefix}/${DATADIRNAME}/locale", [GCompris locale directory])
dnl Set PACKAGE_DATA_DIR
PACKAGE_DATA_DIR="boards"
AC_SUBST(PACKAGE_DATA_DIR)
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${myprefix}/${DATADIRNAME}", [GCompris data directory])
dnl Set PACKAGE_HELP_DIR
PACKAGE_HELP_DIR="${myprefix}/${DATADIRNAME}/${PACKAGE}/help"
AC_SUBST(PACKAGE_HELP_DIR)
dnl Plugin Directory
my_libdir=`eval echo "${libdir}"`
AC_DEFINE_UNQUOTED(PACKAGE_CLIB_DIR, "${my_libdir}", [Gcompris plugins directory])
plugindir=$libdir/gcompris
AC_SUBST(plugindir)
dnl Python plugin Directory
PYTHON_PLUGIN_DIR="${myprefix}/${DATADIRNAME}/${PACKAGE}/python"
AC_SUBST(PYTHON_PLUGIN_DIR)
dnl Test for gnuchess
AC_PATH_PROG(GNUCHESS, gnuchess,no,[/usr/bin:/usr/games:/usr/local/bin:$PATH])
if test x$GNUCHESS = xno; then
AC_MSG_ERROR(Couldn't find gnuchess, please install the gnuchess package version 5 or above)
fi
AC_DEFINE_UNQUOTED(GNUCHESS, "$GNUCHESS", Defines where GNU Chess resides on the system)
AC_PATH_PROG(TEXINFO, makeinfo,no)
if test x$TEXINFO = xno; then
AC_MSG_WARN(Couldn't find texinfo, docs are not compiled. please install the texinfo package)
fi
AM_CONDITIONAL(TEXINFO, test x$TEXINFO != xno)
AC_PATH_PROG(TETEX, texi2html,no)
if test x$TETEX = xno; then
AC_MSG_WARN(Couldn't find texi2html usualy in the tetex package, please install it)
fi
dnl SQLITE support
AC_MSG_CHECKING([wether we build with SQLITE (if not profile will be disabled)])
AC_ARG_ENABLE(sqlite,
AC_HELP_STRING(
[--disable-sqlite],
[Turn off sqlite (will disable profile)]),
with_sqlite="$enableval", with_sqlite="yes")
AC_MSG_RESULT($with_sqlite)
dnl GNET support
AC_MSG_CHECKING([wether we build with GNET (if not, networking will be disabled)])
AC_ARG_ENABLE(gnet,
AC_HELP_STRING(
[--enable-gnet],
[Turn on gnet (will let GCompris fetch content from a web server)]),
with_gnet="$enableval", with_gnet="no")
AC_MSG_RESULT($with_gnet)
if test x$with_gnet = xyes; then
PKG_CHECK_MODULES(GNET, gnet-2.0,, AC_MSG_ERROR([*** GNET not found!]))
AC_DEFINE([USE_GNET], 1,[Networking is enabled])
fi
dnl check for python
AC_ARG_WITH(python,AC_HELP_STRING(
[--with-python=path],
[set the path for python]), python_path=$withval, python_path=not)
if test x$python_path = xno ; then
build_python_plugin="no"
else
if test x$python_path != xnot ; then
PYTHON=$python_path
fi
AM_PATH_PYTHON(2.2)
AM_CHECK_PYTHON_HEADERS( [build_python_plugin="yes"], [build_python_plugin="no"] )
fi
dnl Finally output the required python variables and automake defines.
AM_CONDITIONAL(PYTHON_PLUGIN, test x$build_python_plugin = xyes)
dnl build only support
AC_ARG_ENABLE(py-build-only,
AC_HELP_STRING(
[--enable-py-build-only],
[Skip python modules tests. (Useful if you just need build)]),
py_build_only="$enableval", py_build_only="no")
REQUIRE_PYTHON=""
if test x$build_python_plugin = xno; then
AC_MSG_NOTICE([Python plugin is disabled.])
else
dnl Python interpreter is available so check for pygtk
PKG_CHECK_MODULES(PYGTK, pygtk-2.0)
if test x$py_build_only = xno; then
AM_CHECK_PYMOD(gtk,,,AC_MSG_ERROR([*** pygtk installed but not visible from python ]))
dnl AM_CHECK_PYMOD(xml.dom.DOMImplementation,,,AC_MSG_WARN([*** pyxml missing ]))
dnl Set this variable for the .spec.in file
REQUIRE_PYTHON="python pygtk2.0"
dnl with gnome-python >= 2.10 gnome.canvas is obsolete. use gnomecanvas
dnl gnomecanvas not supported yet in gcompris
dnl
dnl AM_CHECK_PYMOD(gnome.canvas,,test_gnomecanvas="no",test_gnomevanvas="yes")
dnl if test x$test_gnomecanvas = xyes ; then
dnl AM_CHECK_PYMOD(gnomecanvas,,,AC_MSG_ERROR([*** gnome.canvas or gnomecanvas installed but not visible from python ]))
dnl fi
if test x$with_sqlite = xyes; then
AM_CHECK_PYMOD(pysqlite2,,,AC_MSG_ERROR([*** pysqlite2 missing ]))
REQUIRE_PYTHON="$REQUIRE_PYTHON python-sqlite2"
fi
else
AC_MSG_WARN([py-build-only: Skipping python modules dependancies])
AC_MSG_WARN([py-build-only: Do not forget to install pygtk, pysqlite2])
fi
if test x$with_sqlite = xyes; then
PKG_CHECK_MODULES(SQLITE3, sqlite3,, AC_MSG_ERROR([*** SQLITE3 not found!]))
AC_DEFINE([USE_SQLITE], 1,[SQLITE Database, Profiles are enabled])
fi
fi
AM_CONDITIONAL(USE_SQLITE, test x$with_sqlite = xyes)
AC_SUBST(SQLITE3_CFLAGS)
AC_SUBST(SQLITE3_LIBS)
AC_SUBST(REQUIRE_PYTHON)
dnl PYCAIRO SUPPORT
dnl Check for pycairo
AC_ARG_ENABLE(cairo,
AC_HELP_STRING(
[--enable-cairo],
[Enable cairo support (experimental)]),
with_cairo="$enableval", with_cairo="no")
use_cairo=no
if test x$with_cairo = xyes; then
PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0,, AC_MSG_ERROR([*** cairo not found! get it at http://cairographics.org/ if you want --enable-cairo ]))
if test x$py_build_only = xno; then
if test x$build_python_plugin = xyes; then
PKG_CHECK_MODULES(PYCAIRO, pycairo >= 0.5.0,, AC_MSG_ERROR([*** pycairo not found! get it at http://cairographics.org/ if you want --enable-cairo ]))
AM_CHECK_PYMOD(cairo,,,AC_MSG_ERROR([*** pycairo installed but not visible from python ]))
use_cairo=yes
AC_DEFINE([USE_CAIRO],[],[use Cairo graphic library])
else
AC_MSG_WARN([ cairo enabled without python ?])
fi
else
AC_MSG_WARN([py-build-only: skipping test. Do not forget to install pycairo !])
use_cairo=yes
AC_DEFINE([USE_CAIRO],[],[use Cairo graphic library])
fi
fi
AM_CONDITIONAL(USE_CAIRO, test x$use_cairo = xyes)
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(CAIRO_LIBS)
dnl assets version management
# CS
VERSION_VOICES_CS=1.0
AC_SUBST(VERSION_VOICES_CS)
# DA
VERSION_VOICES_DA=1.0
AC_SUBST(VERSION_VOICES_DA)
# DE
VERSION_VOICES_DE=1.0
AC_SUBST(VERSION_VOICES_DE)
# EN
VERSION_VOICES_EN=1.0
AC_SUBST(VERSION_VOICES_EN)
# ES
VERSION_VOICES_ES=1.0
AC_SUBST(VERSION_VOICES_ES)
# EU
VERSION_VOICES_EU=1.0
AC_SUBST(VERSION_VOICES_EU)
# FR
VERSION_VOICES_FR=1.0
AC_SUBST(VERSION_VOICES_FR)
# FI
VERSION_VOICES_FI=1.0
AC_SUBST(VERSION_VOICES_FI)
# HU
VERSION_VOICES_HU=1.0
AC_SUBST(VERSION_VOICES_HU)
# IT
VERSION_VOICES_IT=1.0
AC_SUBST(VERSION_VOICES_IT)
# NL
VERSION_VOICES_MR=1.0
AC_SUBST(VERSION_VOICES_MR)
# NL
VERSION_VOICES_NL=1.0
AC_SUBST(VERSION_VOICES_NL)
# PT
VERSION_VOICES_PT=1.0
AC_SUBST(VERSION_VOICES_PT)
# PT_BR
VERSION_VOICES_PT_BR=1.0
AC_SUBST(VERSION_VOICES_PT_BR)
# RU
VERSION_VOICES_RU=1.0
AC_SUBST(VERSION_VOICES_RU)
# SV
VERSION_VOICES_SV=1.0
AC_SUBST(VERSION_VOICES_SV)
# TR
VERSION_VOICES_TR=1.0
AC_SUBST(VERSION_VOICES_TR)
AC_SUBST(CFLAGS)
dnl Autoconf output
AC_OUTPUT([ gcompris.spec
Makefile.mingw
config.h.mingw
gcompris-installer.nsi
Makefile
autopackage/Makefile
autopackage/default.apspec
src/Makefile
src/gcompris/Makefile
src/gcompris/libgcompris-1.0.pc
src/gcompris/libgcompris-1.0-uninstalled.pc
src/boards/Makefile
src/boards/python/Makefile
src/boards/python/gcompris/Makefile
src/boards/python/gcompris/admin/Makefile
src/boards/python/gcompris/anim/Makefile
src/boards/python/gcompris/bonus/Makefile
src/boards/python/gcompris/score/Makefile
src/boards/python/gcompris/skin/Makefile
src/boards/python/gcompris/sound/Makefile
src/boards/python/gcompris/timer/Makefile
src/boards/python/gcompris/utils/Makefile
src/boards/python/connect4p/Makefile
src/boards/python/admin/Makefile
po/Makefile.in
docs/Makefile
docs/C/Makefile
docs/fr/Makefile
docs/eu/Makefile
boards/Makefile
boards/advanced_colors/Makefile
boards/babymatch/Makefile
boards/babyshapes/Makefile
boards/chronos/Makefile
boards/doubleentry/Makefile
boards/gcompris/Makefile
boards/gcompris/mimetypes/Makefile
boards/geography/Makefile
boards/imageid/Makefile
boards/imagename/Makefile
boards/missing_letter/Makefile
boards/paintings/Makefile
boards/read_colors/Makefile
boards/scales/Makefile
])
echo ""
echo "***************************************************"
echo ""
echo configure complete,
echo with options:
echo "Force python (--enable-py-build-only) = $py_build_only"
echo "Python plugin = $build_python_plugin"
if test -x "${SDL_LIBS}"; then
echo "SDL LIBS (--with-sdl-prefix) = NOT DETECTED (install sdl-devel)"
else
echo "SDL LIBS = found"
fi
echo "XF86VM option (--enable-xf86vidmode) = $found_xf86vidmode"
echo "SQLITE database (--enable-sqlite) = $with_sqlite (profiles depend on this)"
echo "GNET Networking (--enable-gnet) = $with_gnet (networking depends on this)"
echo
echo gcompris will be installed in ${prefix}
echo to compile and install in in another directory
echo type sh configure --prefix=/usr
echo
echo type \'make\' to compile gcompris
echo type \'make install\' to install it
|