- Be more explicit about what is missing during configure and only ask the user to install something if it is not obvious what is missing.

- Check for pkg-config earlier, pkg-config 0.9 should be sufficient according to configure.
- Add pkg-config m4 file to be able to check for pkg-config where it is not installed.
- Fix typo in ChangeLog, add recent buildsystem changes.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2541 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2007-10-09 11:10:47 +00:00
parent 5b476bb629
commit 7792f1b211
4 changed files with 181 additions and 14 deletions

View File

@ -8,8 +8,8 @@
* New: A more realistic miss/hit evaluation system - allows to dodge projectiles.
* New: Top, bottom, left, right, front and rear armor types for units.
* New: Improved scripting language documentation.
* Fix: Skirmish difficulty slider now applies settings to the right players.
* New: UTF-8 and font rendering support added (aids in i18n). This depends on QuesoGLC.
* Fix: Skirmish difficulty slider now applies settings to the right players.
* Campaign Mode:
* Fix: accuracy, damage and ROF upgrades, which were mistakenly applied to Mini-Pods and Mini-Rocket
Artillery, are now correctly applied to Lancer, Bunker Buster, Tank Killer and Ripple Rockets.
@ -21,12 +21,14 @@
* New: Enabled basic level of Human-AI cooperation, for more information visit: http://wz2100.net/wiki/gameplay:cooperative_ai
* New: AI units now return to defend its own base when it's in trouble.
* Improved: AI is faster at producing units, upgrading structures and oil capturing.
* Several other omprovements.
* Several other improvements.
* Fix: AI doesn't get free units when playing in 'Advanced Bases' mode anymore.
* Fix: AI won't preferably attack humans anymore.
* Buildsystem:
* New: Gettext support (0.16.1 included)
* New: Intel C++ Compiler (ICC) supported (10.0 is known to work, FIXME: non-debug compiles only atm :FIXME)
* Change: No optional dependencies anymore (Ogg now required)
* Change: Use pkg-config (0.9 should work) instead of autoconf scripts for SDL, PNG and Ogg/Vorbis (Faster)
* Balancing (Multiplayer):
* Light Cannon:
* weapon damage raised from 25 to 37

View File

@ -82,7 +82,7 @@ version_check ()
fi
}
version_check 1 "pkg-config" "http://pkgconfig.freedesktop.org/" 0 15 || DIE=1
version_check 1 "pkg-config" "http://pkgconfig.freedesktop.org/" 0 9 || DIE=1
version_check 1 "xgettext" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 15 || DIE=1
version_check 1 "msgfmt" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 15 || DIE=1
version_check 1 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 56 || DIE=1

View File

@ -22,7 +22,15 @@ if test "x$LEX" != "xflex" ; then
AC_MSG_ERROR([Flex is not installed])
fi
# Check for pkg-config
PKG_PROG_PKG_CONFIG
# Enable Compiler/LibC GNU extensions
AC_GNU_SOURCE
# Check for gettext
AM_GNU_GETTEXT([external])
@ -155,45 +163,45 @@ AC_CHECK_LIB(m, pow)
AC_CHECK_LIB(z, deflate)
# Look for PhysicsFS
AC_CHECK_HEADER(physfs.h, , AC_MSG_ERROR([PhysicsFS header not found]))
AC_CHECK_LIB(physfs, PHYSFS_init, , AC_MSG_ERROR([PhysicsFS not found]))
AC_CHECK_HEADER(physfs.h, , AC_MSG_ERROR([PhysicsFS header not found.]))
AC_CHECK_LIB(physfs, PHYSFS_init, , AC_MSG_ERROR([PhysicsFS not found.]))
# Look for SDL_net
AC_CHECK_HEADER(SDL/SDL_net.h, , AC_MSG_ERROR([SDL_net header not found]))
AC_CHECK_LIB(SDL_net, SDLNet_Init, , AC_MSG_ERROR([SDL_net not found]), [-lSDL ${WIN32_LIBS}])
AC_CHECK_HEADER(SDL/SDL_net.h, , AC_MSG_ERROR([SDL_net header not found.]))
AC_CHECK_LIB(SDL_net, SDLNet_Init, , AC_MSG_ERROR([SDL_net not found.]), [-lSDL ${WIN32_LIBS}])
# Look for OpenGL
AC_CHECK_HEADER(SDL/SDL_opengl.h, ,
AC_MSG_ERROR([You need to install SDL with OpenGL support.]))
AC_MSG_ERROR([SDL OpenGL header not found. Please install SDL with OpenGL support.]))
AC_CHECK_LIB(GL, main,
OPENGL_LIBS="-lGL",
AC_CHECK_LIB(opengl32, main,
OPENGL_LIBS="-lopengl32",
AC_MSG_ERROR([You need to install OpenGL.])))
AC_MSG_ERROR([OpenGL library not found.])))
AC_CHECK_LIB(GLU, main,
OPENGL_LIBS="${OPENGL_LIBS} -lGLU",
AC_CHECK_LIB(glu32, main,
OPENGL_LIBS="${OPENGL_LIBS} -lglu32",
AC_MSG_ERROR([You need to install GLU.])))
AC_MSG_ERROR([GLU library not found.])))
# Look for OpenGLC
AC_CHECK_HEADER(GL/glc.h, ,
AC_MSG_ERROR([OpenGLC header not found. You need to install QuesoGLC: http://quesoglc.sourceforge.net/]))
AC_MSG_ERROR([OpenGLC header not found. Please install QuesoGLC: http://quesoglc.sourceforge.net/]))
AC_CHECK_LIB(GLC, main,
OPENGLC_LIBS="-lGLC",
AC_CHECK_LIB(glc32, main,
OPENGLC_LIBS="-lglc32",
AC_MSG_ERROR([You need to install QuesoGLC. http://quesoglc.sourceforge.net/])))
AC_MSG_ERROR([OpenGLC library not found. Please install QuesoGLC: http://quesoglc.sourceforge.net/])))
# Look for OpenAL
AC_CHECK_HEADER(AL/al.h, ,
AC_MSG_ERROR([You need to install OpenAL headers.]))
AC_MSG_ERROR([OpenAL header not found.]))
AC_CHECK_LIB(openal, main,
OPENAL_LIBS="-lopenal",
AC_CHECK_LIB(openal32, main,
OPENAL_LIBS="-lopenal32",
AC_MSG_ERROR([You need to install OpenAL.])))
AC_MSG_ERROR([OpenAL library not found.])))
WZ_CFLAGS="${WZ_CFLAGS} -DDATADIR=\"\\\"\${datadir}/\${PACKAGE}\\\"\""

157
m4/pkg.m4 Normal file
View File

@ -0,0 +1,157 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
#
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
# this or PKG_CHECK_MODULES is called, or make sure to call
# PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_ifval([$2], [$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$PKG_CONFIG"; then
if test -n "$$1"; then
pkg_cv_[]$1="$$1"
else
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
fi
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT
])],
[AC_MSG_RESULT([no])
$4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES