configure.in 27.8 KB
Newer Older
1
dnl Process this file with autoconf to produce a configure script.
Bruno Coudoin's avatar
Bruno Coudoin committed
2

3
AC_INIT(src/gcompris/gcompris.c)
4
AC_CANONICAL_TARGET
5
AM_INIT_AUTOMAKE(gcompris, 8.5PRE1)
Bruno Coudoin's avatar
Bruno Coudoin committed
6
AM_CONFIG_HEADER(config.h)
7

8
# Internal libgoocanvas versioning
9 10 11 12 13 14 15 16 17 18 19 20 21
# Libtool versioning - only update before a public release.
# If the code has changed at all: REVISION++.
# If any interfaces have changed at all: CURRENT++, REVISION=0.
# If it is backwards compatible: AGE++, else AGE=0.
LT_CURRENT=3
LT_REVISION=0
LT_AGE=0

LT_VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"

AC_SUBST(LT_VERSION_INFO)


Bruno Coudoin's avatar
Bruno Coudoin committed
22
AM_MAINTAINER_MODE
Bruno Coudoin's avatar
Bruno Coudoin committed
23

24 25
dnl libtool versioning from libgnome

26 27
AC_ISC_POSIX

28
GTK_REQUIRED=2.4.0
29

30 31 32 33 34 35 36 37
dnl
dnl Start of pkg-config checks
dnl

PKG_PROG_PKG_CONFIG()

PKG_CHECK_MODULES(GCOMPRIS, dnl
 [gtk+-2.0 >= $GTK_REQUIRED dnl
38 39
  gstreamer-0.10 dnl
  librsvg-2.0])
40

41 42
AC_SUBST(GCOMPRIS_CFLAGS)
AC_SUBST(GCOMPRIS_LIBS)
43

Bruno Coudoin's avatar
Bruno Coudoin committed
44 45
AC_HEADER_DIRENT

Bruno Coudoin's avatar
Bruno Coudoin committed
46 47
AC_PROG_CC
AM_PROG_CC_STDC
48
AM_PROG_CC_C_O
Bruno Coudoin's avatar
Bruno Coudoin committed
49 50
AC_HEADER_STDC

51
AC_PROG_INTLTOOL
Bruno Coudoin's avatar
Bruno Coudoin committed
52 53

AM_DISABLE_STATIC
54
AC_LIBTOOL_WIN32_DLL
Bruno Coudoin's avatar
Bruno Coudoin committed
55 56
AM_PROG_LIBTOOL

57
pkg_modules="gtk+-2.0 >= 2.10.0 glib-2.0 >= 2.10.0 librsvg-2.0"
58 59 60 61
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)

Bruno Coudoin's avatar
Bruno Coudoin committed
62 63 64
dnl for libart_lgpl
AC_FUNC_ALLOCA
AC_C_BIGENDIAN
65

Yves Combe's avatar
Yves Combe committed
66 67 68 69 70
dnl OSX Specifics
AC_MSG_CHECKING([for OSX])
case "$host" in
  *-apple-darwin*)
    native_osx=yes
71
    OSX_CFLAGS="$CFLAGS -arch i386 -arch ppc "
Yves Combe's avatar
Yves Combe committed
72 73 74
    ;;
  *)
    native_osx=no
75
    OSX_CFLAGS=""
Yves Combe's avatar
Yves Combe committed
76 77 78 79
    ;;
esac
AC_MSG_RESULT([$native_osx])

80 81
AM_CONDITIONAL(OS_MACOSX, test "$native_osx" = yes)

Yves Combe's avatar
Yves Combe committed
82 83 84 85 86 87 88 89 90 91 92
# nsbundle default is no even for osx
nsbundle="no"

AC_ARG_ENABLE(nsbundle,
          AC_HELP_STRING(
          [--enable-nsbundle],
          [Turn on nsbundle packaging (needs Cocoa/GNUstep)]),
          nsbundle="$enableval", nsbundle="no")

NSBUNDLE_CPPFLAGS=
NSBUNDLE_LDFLAGS=
93
NSBUNDLE_GTK_DIR=
Yves Combe's avatar
Yves Combe committed
94 95 96

#check header for nsbundle
if test "x$nsbundle" = "xyes"; then
97 98
   AC_PROG_OBJC([gcc])
   AC_PROG_OBJCPP([gcc])
99

Yves Combe's avatar
Yves Combe committed
100 101 102 103 104 105
   if test "x$native_osx" = "xyes"; then
      AC_LANG_PUSH([Objective C])
      AC_CHECK_HEADER(Foundation/Foundation.h, NSFoundation="yes" , NSFoundation="no")
      if test "x$NSFoundation" = "x$no"; then
	 AC_MSG_ERROR([You need development tools to use nsbundle. Make sure XCode is installed." ])
      fi
106
      NSBUNDLE_GTK_DIR="/../GTK"
Yves Combe's avatar
Yves Combe committed
107
      NSBUNDLE_LDFLAGS="-framework Cocoa "
108
      OBJCFLAGS="$OBJCFLAGS $CFLAGS"
Yves Combe's avatar
Yves Combe committed
109 110 111 112 113 114 115 116 117 118 119 120
      AC_LANG_POP([Objective C])
   else
      AC_LANG_PUSH([Objective C])
      saved_CPPFLAGS="$CPPFLAGS"
      if test "x$GNUSTEP_SYSTEM_ROOT" != "x"; then
         CPPFLAGS="$CPPFLAGS -I$GNUSTEP_SYSTEM_ROOT/Library/Headers "
      fi
      AC_CHECK_HEADER(Foundation/Foundation.h, NSFoundation="yes" , NSFoundation="no")
      if test "x$NSFoundation" = "xno"; then
         AC_MSG_ERROR([You need GNUstep dev to use nsbundle. Make sure GNUSTEP_SYSTEM_ROOT is set." ])
      fi
      CPPFLAGS="$saved_CPPFLAGS"
121
      OBJCFLAGS="$OBJCFLAGS $CFLAGS -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fconstant-string-class=NSConstantString -I$GNUSTEP_SYSTEM_ROOT/Library/Headers "
122
      NSBUNDLE_GTK_DIR="/GTK"
123
      NSBUNDLE_LDFLAGS="-rdynamic -fgnu-runtime -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lgnustep-base -lgnustep-gui -Wl,-rpath=\\\$\$ORIGIN/$NSBUNDLE_GTK_DIR/lib "
Yves Combe's avatar
Yves Combe committed
124 125
      AC_LANG_POP([Objective C])
   fi
126
   AC_DEFINE_UNQUOTED(NSBUNDLE, 1, [ Define to 1 to use NSBundle for relocation (OSX/GNUstep) ])
Yves Combe's avatar
Yves Combe committed
127
   AC_DEFINE_UNQUOTED(NSBUNDLE_GTK_DIR, "$NSBUNDLE_GTK_DIR", [ Define to 1 to use NSBundle for relocation (OSX/GNUstep) ])
128 129 130
else
OBJC=$CC
AC_SUBST(OBJC)
Yves Combe's avatar
Yves Combe committed
131 132
fi

133 134
_AM_DEPENDENCIES([OBJC])

Yves Combe's avatar
Yves Combe committed
135 136
AC_SUBST(NSBUNDLE_CPPFLAGS)
AC_SUBST(NSBUNDLE_LDFLAGS)
137
AC_SUBST(NSBUNDLE_GTK_DIR)
Yves Combe's avatar
Yves Combe committed
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153

# Todo: add a AC_ARG_WITH to allow change.
bundlename=GCompris


nsbundledir=$(pwd)"/$bundlename.app"
BUNDLE_APPDIR="$nsbundledir"
BUNDLE_NAME="$bundlename"
AC_SUBST(BUNDLE_APPDIR)
AC_SUBST(BUNDLE_NAME)

AM_CONDITIONAL(WITH_NSBUNDLE, test "$nsbundle" = yes)


# Provide relocatable API from autopackage
# From http://autopackage.org/docs/binreloc/
154
enable_binreloc=auto
Yves Combe's avatar
Yves Combe committed
155 156 157 158 159 160 161
if test x"$nsbundle" = "xyes" ; then
enable_binreloc=no
AC_MSG_NOTICE([binreloc disabled by nsbundle])
fi

AM_BINRELOC

162
dnl GNOME2 GNOME_X_CHECKS
163 164 165 166 167 168 169
AM_PATH_GLIB_2_0

dnl libxml-2 Checks
PKG_CHECK_MODULES(XML, libxml-2.0)
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)

170 171 172 173
dnl Freetype2 flags (needed for libgnomecanvas)
PKG_CHECK_MODULES(FT2, freetype2)
AC_SUBST(FT2_CFLAGS)

174
dnl glib-genmarshal
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)

GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_MKENUMS)

AC_ARG_ENABLE(rebuilds,
              [AC_HELP_STRING([--disable-rebuilds],
                              [disable all source autogeneration rules])],,
              [enable_rebuilds=yes])

# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_PATH_PROGS(PERL, perl5 perl)
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
     test -n "$PERL" && \
     $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
  REBUILD=
fi
AC_SUBST(REBUILD)
196

197
AM_ICONV
Bruno Coudoin's avatar
Bruno Coudoin committed
198

199
LDFLAGS="${LDFLAGS}"
200

Bruno Coudoin's avatar
Bruno Coudoin committed
201
dnl Add the languages which your application supports here.
202
ALL_LINGUAS="af am ar ar_TN az bg br ca cs da de dz el en_CA en_GB es et eu fi fr ga gl gu he hi hr hu id it ja ka ko lt mk ml mr ms nb ne nl nn oc pa pl pt pt_BR ro ru rw sk sl so sq sr sr@Latn sv ta th tr uk vi wa zh_CN zh_TW"
Bruno Coudoin's avatar
Bruno Coudoin committed
203 204 205 206 207

dnl GCompris needs to know which locale are supported
AC_SUBST(ALL_LINGUAS)
AC_DEFINE_UNQUOTED(ALL_LINGUAS, "${ALL_LINGUAS}", [Supported languages])

208 209
GETTEXT_PACKAGE=gcompris
AC_SUBST(GETTEXT_PACKAGE)
210

211
AM_GLIB_GNU_GETTEXT
212

213
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package name])
Bruno Coudoin's avatar
Bruno Coudoin committed
214

215 216
BUILD_DATE=`date +%y%m`
AC_DEFINE_UNQUOTED(BUILD_DATE,"$BUILD_DATE", [Date at which GCompris has been built])
Bruno Coudoin's avatar
Bruno Coudoin committed
217
AC_SUBST(BUILD_DATE)
218

Bruno Coudoin's avatar
Bruno Coudoin committed
219 220 221 222 223 224 225
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

226 227 228
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
229
  exec_prefix=${myprefix}
230 231 232 233
fi



234 235
dnl Some debug option
AC_ARG_ENABLE(debug,
236 237 238 239 240 241
          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.")
242
    CFLAGS="$CFLAGS $OSX_CFLAGS -Wall -Werror -g"
Bruno Coudoin's avatar
Bruno Coudoin committed
243
else
244
    CFLAGS="$CFLAGS $OSX_CFLAGS -Wall -Werror"
245
fi
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
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

307 308 309
dnl
dnl === DIRECTORY DEFINITIONS ===
dnl
Bruno Coudoin's avatar
Bruno Coudoin committed
310

311
if test "x$platform_win32" = "xno" ; then
Bruno Coudoin's avatar
Bruno Coudoin committed
312

313 314
  dnl Set PACKAGE_LOCALE_DIR in config.h.
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${myprefix}/${DATADIRNAME}/locale", [GCompris locale directory])
Bruno Coudoin's avatar
Bruno Coudoin committed
315

316 317 318 319
  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])
Bruno Coudoin's avatar
Bruno Coudoin committed
320

321 322 323 324 325 326 327 328 329 330 331 332 333 334
  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)

Bruno Coudoin's avatar
Bruno Coudoin committed
335 336 337
  dnl System GCompris config directory
  AC_DEFINE_UNQUOTED(SYSTEM_CONFIG_DIR, "/etc", [System GCompris config directory])

338 339
else
  DATADIRNAME="share"
340

341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
  dnl Set PACKAGE_LOCALE_DIR in config.h for WINDOWS
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "../${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, "../${DATADIRNAME}", [GCompris data directory])

  dnl Set PACKAGE_HELP_DIR
  PACKAGE_HELP_DIR="${myprefix}/${DATADIRNAME}/gnome/help/gcompris"
  AC_SUBST(PACKAGE_HELP_DIR)

  dnl Plugin Directory
  AC_DEFINE_UNQUOTED(PACKAGE_CLIB_DIR, "../${DATADIRNAME}", [Gcompris plugins directory])
  plugindir=${myprefix}/${DATADIRNAME}/gcompris
  AC_SUBST(plugindir)

  dnl Python plugin Directory
  PYTHON_PLUGIN_DIR="${myprefix}/${DATADIRNAME}/gcompris/python"
  AC_SUBST(PYTHON_PLUGIN_DIR)

fi
Bruno Coudoin's avatar
Bruno Coudoin committed
363

364
dnl Test for gnuchess
365
AC_PATH_PROGS(GNUCHESS, gnuchess gnome-gnuchess, no, [/usr/bin:/usr/games:/usr/local/bin:$PATH])
Bruno Coudoin's avatar
Bruno Coudoin committed
366

367 368 369
if test x$GNUCHESS = xno; then
  AC_MSG_ERROR(Couldn't find gnuchess, please install the gnuchess package version 5 or above)
fi
370
AC_DEFINE_UNQUOTED(GNUCHESS, "$GNUCHESS", Defines where GNU Chess resides on the system)
371

Bruno Coudoin's avatar
Bruno Coudoin committed
372 373
AC_PATH_PROG(TEXINFO, makeinfo,no)
if test x$TEXINFO = xno; then
374
  AC_MSG_WARN(Couldn't find texinfo, docs are not compiled. please install the texinfo package)
Bruno Coudoin's avatar
Bruno Coudoin committed
375
fi
376
AM_CONDITIONAL(TEXINFO, test x$TEXINFO != xno)
Bruno Coudoin's avatar
Bruno Coudoin committed
377 378 379

AC_PATH_PROG(TETEX, texi2html,no)
if test x$TETEX = xno; then
380
  AC_MSG_WARN(Couldn't find texi2html usualy in the tetex package, please install it)
Bruno Coudoin's avatar
Bruno Coudoin committed
381 382
fi

383

384 385 386 387 388 389 390 391 392
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)

393 394 395 396 397 398 399 400 401 402 403 404 405
dnl GNET support (BROKEN)
dnl AC_MSG_CHECKING([wether we build with GNET (if not, networking will be disabled)])
dnl AC_ARG_ENABLE(gnet,
dnl           AC_HELP_STRING(
dnl           [--enable-gnet],
dnl           [Turn on gnet (will let GCompris fetch content from a web server)]),
dnl           with_gnet="$enableval", with_gnet="no")
dnl AC_MSG_RESULT($with_gnet)

dnl if test x$with_gnet = xyes; then
dnl   PKG_CHECK_MODULES(GNET, gnet-2.0,, AC_MSG_ERROR([*** GNET not found!]))
dnl   AC_DEFINE([USE_GNET], 1,[Networking is enabled])
dnl fi
406

407 408 409 410 411 412 413 414 415 416 417 418 419 420
dnl DBUS support
AC_MSG_CHECKING([wether we build with DBUS (needed only for OLPC SUGAR XO)])
AC_ARG_ENABLE(dbus,
          AC_HELP_STRING(
          [--enable-dbus],
          [Turn on dbus (will let GCompris integrate well on OLPC SUGAR XO)]),
          with_dbus="$enableval", with_dbus="no")
AC_MSG_RESULT($with_dbus)

if test x$with_dbus = xyes; then
  PKG_CHECK_MODULES(DBUS, [dbus-1 dbus-glib-1],, AC_MSG_ERROR([*** DBUS not found!]))
  AC_DEFINE([USE_DBUS], 1,[DBUS support is enabled])
fi

421 422 423 424 425 426
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"
427 428
else

429 430 431 432

if test x$python_path != xnot ; then
PYTHON=$python_path
fi
433

434 435 436
AM_PATH_PYTHON(2.2)
AM_CHECK_PYTHON_HEADERS( [build_python_plugin="yes"], [build_python_plugin="no"] )

437 438 439 440 441
fi

dnl Finally output the required python variables and automake defines.
AM_CONDITIONAL(PYTHON_PLUGIN, test x$build_python_plugin = xyes)

442 443 444 445 446 447 448
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")

449
REQUIRE_PYTHON=""
450 451 452
if test x$build_python_plugin = xno; then
  AC_MSG_NOTICE([Python plugin is disabled.])
else
453
  dnl Python interpreter is available so check for pygtk
454
  PKG_CHECK_MODULES(PYGTK, pygtk-2.0 pycairo)
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471

  AC_MSG_CHECKING([for pygtk defs])
  PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
  AC_MSG_RESULT([$PYGTK_DEFSDIR])

  AC_MSG_CHECKING([for pygtk codegen])
  PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
  AC_MSG_RESULT([$PYGTK_CODEGEN])

  AC_MSG_CHECKING([for pygtk h2def])
  PYGTK_H2DEF="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/h2def.py"
  AC_MSG_RESULT([$PYGTK_H2DEF])

  AC_SUBST([PYGTK_DEFSDIR])
  AC_SUBST([PYGTK_CODEGEN])
  AC_SUBST([PYGTK_H2DEF])

472 473
  if test x$py_build_only = xno; then
    AM_CHECK_PYMOD(gtk,,,AC_MSG_ERROR([*** pygtk installed but not visible from python ]))
474
    dnl AM_CHECK_PYMOD(xml.dom.DOMImplementation,,,AC_MSG_WARN([*** pyxml missing ]))
475

476
    dnl Set this variable for the .spec.in file
477
    REQUIRE_PYTHON="python pygtk2.0"
478

479
    dnl with gnome-python >= 2.10 gnome.canvas is obsolete. use gnomecanvas
480 481 482 483 484 485 486 487 488 489 490 491
    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

492 493
  else
    AC_MSG_WARN([py-build-only: Skipping python modules dependancies])
494
    AC_MSG_WARN([py-build-only: Do not forget to install pygtk, pysqlite2])
495
  fi
496

497 498 499
fi

if test x$with_sqlite = xyes; then
500 501
    PKG_CHECK_MODULES(SQLITE3, sqlite3,, AC_MSG_ERROR([*** SQLITE3 not found!]))
    AC_DEFINE([USE_SQLITE], 1,[SQLITE Database, Profiles are enabled])
502 503
fi

504
AM_CONDITIONAL(USE_SQLITE, test x$with_sqlite = xyes)
505 506 507
AC_SUBST(SQLITE3_CFLAGS)
AC_SUBST(SQLITE3_LIBS)

508 509
AC_SUBST(REQUIRE_PYTHON)

510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532
dnl mingw32 specific stuff.
dnl use libgw32c
dnl define __GW32__ and WIN32

# Check platform - see if WinMain needed:
AC_MSG_CHECKING([for native Win32])
case "$host" in
  *-*-mingw*)
    native_win32=yes
    ;;
  *)
    native_win32=no
    ;;
esac
AC_MSG_RESULT([$native_win32])

AM_CONDITIONAL(BUILD_MINGW32, test "$native_win32" = yes)
if test "$native_win32" = yes; then
   LIBS="$LIBS -luuid -lole32 -lwsock32 -mno-cygwin -mms-bitfields -mwindows -mconsole"
   #CFLAGS="$CFLAGS -D__GW32__ -DWIN32 -I$CROSS_ROOT/include -I$CROSS_ROOT/include/glibc"
   #CFLAGS="$CFLAGS -DWIN32"
fi

533
AC_SUBST(CFLAGS)
534
AC_SUBST(LIBS)
535

Bruno Coudoin's avatar
Bruno Coudoin committed
536 537 538 539 540 541 542 543 544 545 546
dnl disable activation code
AC_ARG_ENABLE(activation-code,
          AC_HELP_STRING(
          [--disable-activation-code],
          [For Windows version, disable the activation code]),
          activation_code="$enableval", activation_code="yes")

if test x$activation_code = xno; then
  AC_DEFINE([DISABLE_ACTIVATION_CODE], 1,[Activation code is disabled])
fi

547
dnl Autoconf output
548
AC_OUTPUT([ Makefile.mingw
Bruno Coudoin's avatar
Bruno Coudoin committed
549
Makefile
550
autopackage/Makefile
551
autopackage/default.apspec
Bruno Coudoin's avatar
Bruno Coudoin committed
552
boards/Makefile
553 554 555 556 557 558
config.h.mingw
docs/C/Makefile
docs/Makefile
docs/eu/Makefile
docs/fr/Makefile
gcompris-installer.nsi
559
macosx/Makefile
560
po/Makefile.in
Bruno Coudoin's avatar
Bruno Coudoin committed
561 562
src/tuxpaint-activity/Makefile
src/billard-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
563
src/billard-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
564 565
src/billard-activity/resources/billard/Makefile
src/clickgame-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
566
src/clickgame-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
567 568
src/clickgame-activity/resources/clickgame/Makefile
src/planegame-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
569
src/planegame-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
570 571 572 573 574 575 576
src/planegame-activity/resources/planegame/Makefile
src/superbrain-activity/Makefile
src/superbrain-activity/resources/superbrain/Makefile
src/superbrain-activity/resources/Makefile
src/money_cents-activity/Makefile
src/memory_add_minus_mult_div_tux-activity/Makefile
src/redraw_symmetrical-activity/Makefile
577 578
src/redraw_symmetrical-activity/resources/Makefile
src/redraw_symmetrical-activity/resources/redraw_symmetrical/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
579
src/gletters-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
580
src/gletters-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
581 582 583 584 585
src/gletters-activity/resources/gletters/Makefile
src/hanoi_real-activity/Makefile
src/hanoi_real-activity/resources/hanoi_real/Makefile
src/hanoi_real-activity/resources/Makefile
src/algorithm-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
586
src/algorithm-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
587
src/algorithm-activity/resources/algorithm/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
588 589 590 591 592 593 594 595
src/algebra_guesscount-activity/Makefile
src/algebra_guesscount-activity/resources/Makefile
src/algebra_guesscount-activity/resources/algebra_guesscount/Makefile
src/read_colors-activity/Makefile
src/read_colors-activity/resources/read_colors/Makefile
src/read_colors-activity/resources/Makefile
src/memory_sound_tux-activity/Makefile
src/watercycle-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
596
src/watercycle-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
597 598
src/watercycle-activity/resources/watercycle/Makefile
src/awele-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
599
src/awele-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
600
src/awele-activity/resources/awele/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
601
src/reversecount-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
602
src/reversecount-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
603 604 605 606 607 608 609 610
src/reversecount-activity/resources/reversecount/Makefile
src/chess_partyend-activity/Makefile
src/connect4-2players-activity/Makefile
src/draw-activity/Makefile
src/imagename-activity/Makefile
src/imagename-activity/resources/Makefile
src/imagename-activity/resources/imagename/Makefile
src/electric-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
611
src/electric-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
612
src/electric-activity/resources/electric/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
613 614
src/hanoi-activity/Makefile
src/connect4-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
615
src/connect4-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
616 617 618 619 620 621 622 623 624
src/connect4-activity/resources/connect4/Makefile
src/connect4-activity/connect4p/Makefile
src/memory_minus_tux-activity/Makefile
src/babymatch-activity/Makefile
src/babymatch-activity/resources/Makefile
src/babymatch-activity/resources/babymatch/Makefile
src/memory_mult_tux-activity/Makefile
src/memory_mult-activity/Makefile
src/fifteen-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
625
src/fifteen-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
626
src/fifteen-activity/resources/fifteen/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
627
src/guessnumber-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
628
src/guessnumber-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
629 630
src/guessnumber-activity/resources/guessnumber/Makefile
src/geography-activity/Makefile
631 632
src/geography-activity/resources/Makefile
src/geography-activity/resources/geography/Makefile
633 634 635 636 637 638
src/geography-activity/resources/geography/africa/Makefile
src/geography-activity/resources/geography/afrique/Makefile
src/geography-activity/resources/geography/continents/Makefile
src/geography-activity/resources/geography/europe/Makefile
src/geography-activity/resources/geography/northamerica/Makefile
src/geography-activity/resources/geography/southamerica/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
639 640 641
src/chat-activity/Makefile
src/readingv-activity/Makefile
src/melody-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
642
src/melody-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
643 644 645 646 647 648
src/melody-activity/resources/melody/Makefile
src/gcompris/Makefile
src/missing_letter-activity/Makefile
src/missing_letter-activity/resources/missing_letter/Makefile
src/missing_letter-activity/resources/Makefile
src/erase-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
649
src/erase-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
650 651
src/erase-activity/resources/erase/Makefile
src/enumerate-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
652
src/enumerate-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
653 654 655 656 657
src/enumerate-activity/resources/enumerate/Makefile
src/pythontest-activity/Makefile
src/gnumch-factors-activity/Makefile
src/maze2DRelative-activity/Makefile
src/money-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
658
src/money-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
659 660 661
src/money-activity/resources/money/Makefile
src/algebra_plus-activity/Makefile
src/crane-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
662
src/crane-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
663 664
src/crane-activity/resources/crane/Makefile
src/bargame-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
665
src/bargame-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
666 667 668
src/bargame-activity/resources/bargame/Makefile
src/pythontemplate-activity/Makefile
src/submarine-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
669
src/submarine-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
670
src/submarine-activity/resources/submarine/Makefile
671 672 673 674
src/geo_country-activity/Makefile
src/geo_country-activity/resources/Makefile
src/geo_country-activity/resources/geo_country/Makefile
src/geo_country-activity/resources/geo_country/argentina/Makefile
675 676
src/geo_country-activity/resources/geo_country/brazil/Makefile
src/geo_country-activity/resources/geo_country/canada/Makefile
677 678
src/geo_country-activity/resources/geo_country/france/Makefile
src/geo_country-activity/resources/geo_country/germany/Makefile
679
src/geo_country-activity/resources/geo_country/mexico/Makefile
680 681 682
src/geo_country-activity/resources/geo_country/norway/Makefile
src/geo_country-activity/resources/geo_country/poland/Makefile
src/geo_country-activity/resources/geo_country/turkey/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
683
src/paratrooper-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
684
src/paratrooper-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
685 686
src/paratrooper-activity/resources/paratrooper/Makefile
src/readingh-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
687
src/readingh-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
688 689
src/readingh-activity/resources/wordsgame/Makefile
src/drawnumber-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
690
src/drawnumber-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
691 692 693 694 695 696
src/drawnumber-activity/resources/drawnumber/Makefile
src/mazeInvisible-activity/Makefile
src/memory_mult_div_tux-activity/Makefile
src/smallnumbers2-activity/Makefile
src/memory_add-activity/Makefile
src/scalesboard-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
697
src/scalesboard-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
698 699 700 701
src/scalesboard-activity/resources/scale/Makefile
src/memory_add_tux-activity/Makefile
src/magic_hat_minus-activity/Makefile
src/magic_hat_minus-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
702
src/magic_hat_minus-activity/resources/magic_hat/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
703 704 705 706 707 708 709 710 711 712
src/algebra_by-activity/Makefile
src/algebra_by-activity/resources/Makefile
src/algebra_by-activity/resources/algebra/Makefile
src/doubleentry-activity/Makefile
src/doubleentry-activity/resources/doubleentry/Makefile
src/doubleentry-activity/resources/Makefile
src/chronos-activity/Makefile
src/chronos-activity/resources/chronos/Makefile
src/chronos-activity/resources/Makefile
src/redraw-activity/Makefile
713 714
src/redraw-activity/resources/Makefile
src/redraw-activity/resources/redraw/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
715
src/maze-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
716
src/maze-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
717
src/maze-activity/resources/maze/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
718 719
src/memory_add_minus_mult_div-activity/Makefile
src/colors-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
720
src/colors-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
721 722
src/colors-activity/resources/colors/Makefile
src/clockgame-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
723
src/clockgame-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
724
src/clockgame-activity/resources/clockgame/Makefile
725 726 727
src/doubleclick-activity/Makefile
src/doubleclick-activity/resources/Makefile
src/doubleclick-activity/resources/doubleclick/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
728 729 730 731
src/memory_div_tux-activity/Makefile
src/memory_div-activity/Makefile
src/Makefile
src/smallnumbers-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
732
src/smallnumbers-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
733 734
src/smallnumbers-activity/resources/smallnumbers/Makefile
src/searace-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
735
src/searace-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
736 737 738 739
src/searace-activity/resources/searace/Makefile
src/administration-activity/admin/Makefile
src/administration-activity/Makefile
src/ballcatch-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
740
src/ballcatch-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
741 742 743 744 745 746
src/ballcatch-activity/resources/ballcatch/Makefile
src/canal_lock-activity/Makefile
src/canal_lock-activity/resources/Makefile
src/canal_lock-activity/resources/canal_lock/Makefile
src/memory_add_minus-activity/Makefile
src/gnumch-equality-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
747
src/gnumch-equality-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
748 749 750
src/gnumch-equality-activity/resources/gnumch/Makefile
src/erase_clic-activity/Makefile
src/anim-activity/Makefile
751 752
src/anim-activity/resources/Makefile
src/anim-activity/resources/anim/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
753
src/target-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
754
src/target-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
755 756
src/target-activity/resources/target/Makefile
src/memory-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
757
src/memory-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
758 759 760 761 762 763 764 765 766 767 768 769 770
src/memory-activity/resources/memory/Makefile
src/wordsgame-activity/Makefile
src/advanced_colors-activity/Makefile
src/advanced_colors-activity/resources/advanced_colors/Makefile
src/advanced_colors-activity/resources/Makefile
src/memory_mult_div-activity/Makefile
src/algebra_minus-activity/Makefile
src/tangram-activity/Makefile
src/tangram-activity/resources/Makefile
src/tangram-activity/resources/tangram/Makefile
src/gnumch-inequality-activity/Makefile
src/maze3D-activity/Makefile
src/chess_computer-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
771
src/chess_computer-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
772 773 774 775 776
src/chess_computer-activity/resources/chess/Makefile
src/sudoku-activity/Makefile
src/sudoku-activity/resources/Makefile
src/sudoku-activity/resources/sudoku/Makefile
src/hexagon-activity/Makefile
777 778
src/hexagon-activity/resources/Makefile
src/hexagon-activity/resources/hexagon/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
779 780
src/magic_hat_plus-activity/Makefile
src/railroad-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
781
src/railroad-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
782 783 784 785 786 787
src/railroad-activity/resources/railroad/Makefile
src/memory_sound-activity/Makefile
src/memory_add_minus_tux-activity/Makefile
src/gnumch-multiples-activity/Makefile
src/babyshapes-activity/Makefile
src/babyshapes-activity/resources/babyshapes/Makefile
788 789 790 791
src/babyshapes-activity/resources/babyshapes/dog1/Makefile
src/babyshapes-activity/resources/babyshapes/dog2/Makefile
src/babyshapes-activity/resources/babyshapes/dog3/Makefile
src/babyshapes-activity/resources/babyshapes/food/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810
src/babyshapes-activity/resources/Makefile
src/boards/python/gcompris/utils/Makefile
src/boards/python/gcompris/score/Makefile
src/boards/python/gcompris/bonus/Makefile
src/boards/python/gcompris/timer/Makefile
src/boards/python/gcompris/admin/Makefile
src/boards/python/gcompris/Makefile
src/boards/python/gcompris/anim/Makefile
src/boards/python/gcompris/skin/Makefile
src/boards/python/gcompris/sound/Makefile
src/boards/python/Makefile
src/boards/Makefile
src/click_on_letter-activity/Makefile
src/click_on_letter-activity/resources/click_on_letter/Makefile
src/click_on_letter-activity/resources/Makefile
src/memory_minus-activity/Makefile
src/wordprocessor-activity/Makefile
src/memory_tux-activity/Makefile
src/paintings-activity/Makefile
811 812
src/paintings-activity/resources/Makefile
src/paintings-activity/resources/paintings/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
813
src/traffic-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
814
src/traffic-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
815
src/traffic-activity/resources/traffic/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
816
src/leftright-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
817
src/leftright-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
818 819
src/leftright-activity/resources/leftright/Makefile
src/login-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
820
src/login-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
821 822 823 824 825 826 827
src/login-activity/resources/login/Makefile
src/imageid-activity/Makefile
src/imageid-activity/resources/Makefile
src/imageid-activity/resources/imageid/Makefile
src/searace1player-activity/Makefile
src/chess_movelearn-activity/Makefile
src/followline-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
828
src/followline-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
829 830 831 832
src/followline-activity/resources/followline/Makefile
src/clickanddraw-activity/Makefile
src/gnumch-primes-activity/Makefile
src/mosaic-activity/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
833
src/mosaic-activity/resources/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
834
src/mosaic-activity/resources/mosaic/Makefile
835 836
src/goocanvas/Makefile
src/goocanvas/src/Makefile
Bruno Coudoin's avatar
Bruno Coudoin committed
837 838 839 840 841 842
])

echo ""
echo "***************************************************"
echo ""
echo configure complete,
843
echo with options:
844 845 846 847

echo "Force python (--enable-py-build-only)    = $py_build_only"
echo "Python plugin                            = $build_python_plugin"

848
echo "SQLITE database (--enable-sqlite)        = $with_sqlite (profiles depend on this)"
849

850
echo "DBUS Support (OLPC XO Sugar)             = $with_dbus"
851
echo "BINRELOC (--enable-binreloc)             = $br_cv_binreloc"
Yves Combe's avatar
Yves Combe committed
852 853
echo "NSBundle (--enable-nsbundle)             = $nsbundle"

854

855
echo
Bruno Coudoin's avatar
Bruno Coudoin committed
856 857 858 859 860
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
861
echo type \'make install\' to install it