autotools: Make --with-gtk the default if GTK+ is installed

Also update the readmes.
scancodes-fix
Günther Brammer 2009-08-22 15:31:30 +02:00
parent 77b63f282b
commit 6e4e0f794c
3 changed files with 10 additions and 13 deletions

View File

@ -5,22 +5,20 @@ To build on Linux you need the following packages (Debian names given):
make gcc g++
automake autoconf
libc6-dev libx11-dev libxxf86vm-dev libxpm-dev libglew1.5-dev libgl1-mesa-dev
libpng12-dev libssl-dev libsdl1.2-dev libsdl-mixer1.2-dev libssl-dev
libgtk2.0-dev libjpeg62-dev zlib1g-dev
libc6-dev libx11-dev libxxf86vm-dev libxrandr-dev libxpm-dev libglew1.5-dev
libgl1-mesa-dev libpng12-dev libssl-dev libsdl1.2-dev libsdl-mixer1.2-dev
libssl-dev libgtk2.0-dev libjpeg62-dev zlib1g-dev
Build
=====
If you build from version control, you need to run this:
autoreconf -i && ./configure 'CXX=g++-4.1' && make
autoreconf -i && ./configure && make
To build from tarball, run this:
./configure 'CXX=g++-4.1' && make
Alternatively, you can use 'CXX=g++ -std=gnu++0x' if you have g++ version 4.3 or newer.
./configure && make
If you want a debug build, pass --enable-debug to configure, for the developer mode
--with-gtk. Other options are listed by ./configure --help.

View File

@ -57,9 +57,6 @@ cd to this directory, and execute:
./autogen.sh && ./configure && make
To use g++ version 4.3 or newer, you need to pass CXX='g++ -std=gnu++0x'
to configure. g++ version 4.2 is not able to compile Clonk.
To compile a debugbuild, pass --enable-debug to configure. Other options are
listed by ./configure --help.

View File

@ -85,11 +85,13 @@ AC_ARG_ENABLE([sound],
[AC_HELP_STRING([--enable-sound],[compile with sound support [default=yes]])],
, [if test $enable_console = yes; then enable_sound=no; else if test $win32 = true; then enable_sound=no; else enable_sound=yes; fi; fi])
# GTK+
GTK_REQUIRED="glib-2.0 >= 2.4 gtk+-2.0 >= 2.4"
AC_ARG_WITH([gtk],
[AC_HELP_STRING([--with-gtk], [Use gtk for the developer mode [default=no]])],
, [with_gtk=no])
[AC_HELP_STRING([--with-gtk], [Use gtk for the developer mode [default=auto]])],
, [PKG_CHECK_EXISTS([$GTK_REQUIRED], [with_gtk=yes], [with_gtk=no])])
AS_IF([test $with_gtk = yes],[
PKG_CHECK_MODULES(GTK, glib-2.0 >= 2.4 gtk+-2.0 >= 2.4)
PKG_CHECK_MODULES(GTK, [$GTK_REQUIRED])
AC_DEFINE([WITH_GLIB], 1, [Glib])
AC_DEFINE([WITH_DEVELOPER_MODE], 1, [Developer mode])
DEVELOPER_MODE=true