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
|
dnl Process this file with autoconf to produce a configure script.
dnl Created by Anjuta - will be overwritten
dnl If you don't want it to overwrite it,
dnl Please disable it in the Anjuta project configuration
AC_INIT(configure.in)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(bomberclone, 0.11.9)
AM_CONFIG_HEADER(config.h)
AC_EXEEXT
AC_OBJEXT
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_INLINE
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(vsnprintf)
dnl AC_LIB_RPATH
dnl Checks for programs.
dnl Checks for libraries.
dnl Check for SDL
AM_PATH_SDL(1.1.0,
:,
AC_MSG_ERROR(SDL not found. Make sure sdl-config is in your PATH, or specify with --with-sdl-prefix)
)
CFLAGS="$SDL_CFLAGS $CFLAGS"
SDL_LIBS="$SDL_LIBS -lpng -ljpeg"
LIBS="$SDL_LIBS $LIBS"
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics.
case "$target" in
*cygwin* | *mingw32* | *mingw32msvc* )
CFLAGS="$CFLAGS"
LIBS="$LIBS -liberty -lwsock32 -lm"
MINGW32=yes
;;
*solaris* )
CFLAGS="$CFLAGS"
LIBS="$LIBS -lsocket -lnsl -lm"
AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
SYS_GL_LIBS="$X_LIBS -lGL -lGLU"
else
SYS_GL_LIBS="-lGL -lGLU"
fi
;;
*)
AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
fi
;;
esac
dnl Debug ************************************
AC_ARG_ENABLE(debug, [ --disable-debug Disable Debuging ])
if test x$enable_debug = xno ; then
CFLAGS="$CFLAGS"
else
CFLAGS="$CFLAGS -ggdb -O0"
LDFLAGS="$LDFLAGS -ggdb"
AC_MSG_WARN(Enable Debuging)
fi
dnl All Warning are Errors ************************
AC_ARG_ENABLE(werror, [ --disable-werror Disable Warning as Error Treatment ])
if test x$enable_werror = xno ; then
CFLAGS="$CFLAGS -Wall"
AC_MSG_WARN(Disable Warning as Error Treatment)
else
CFLAGS="$CFLAGS -Wall -Werror"
fi
dnl SDL_image library *****************************
AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, , AC_MSG_ERROR([
*** Unable to find SDL_image libary with PNG support
(http://www.libsdl.org/projects/SDL_image/)
]))
dnl SDL_mixer **********************************
AC_ARG_ENABLE(sdlmixer, [ --disable-sdlmixer Do not compile with SDL Mixer support ])
AC_ARG_WITH(sdlmixer-prefix, [ --with-sdlmixer-prefix=PFX prefix where SDL_mixer library is installed], sdlmixer_prefix="$withval", sdlmixer_prefix="")
if test x$enable_sdlmixer = xno ; then
AC_MSG_WARN(Disable SDLMixer support)
have_sdl_mixer=no
else
if test x"$sdlmixer_prefix" != "x"; then
SDLMIXER_LIB="-L$sdlmixer_prefix/lib"
SDLMIXER_CFLAGS="-I$sdlmixer_prefix/include"
LDFLAGS="$SDLMIXER_LIB $LDFLAGS"
CFLAGS="$CFLAGS $SDLMIXER_CFLAGS"
fi
AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, have_sdl_mixer="yes", have_sdl_mixer="no" , )
if test "x$have_sdl_mixer" = "xyes"; then
AC_DEFINE(HAVE_SDL_MIXER, [1], [SDL_mixer])
LIBS="$LIBS -lSDL_mixer"
else
AC_MSG_WARN([*** libSDL_mixer not found. Make sure you have the development package of SDL_mixer installed - (www.libsdl.org) - or try to use --with-sdlmixer-prefix option])
fi
fi
dnl Checks for library functions.
dnl Check for rintf and functions like that
AC_MSG_CHECKING(for rintf)
have_rintf=no
AC_TRY_COMPILE([
#include <math.h>
],[
int i; float f; i = rintf (f);
],[
have_rintf=yes
])
AC_MSG_RESULT($have_rintf)
if test x$have_rintf = xno; then
AC_CHECK_LIB(m, rintf, have_rintf=yes, have_rintf=no , )
fi
if test x$have_rintf = xyes; then
AC_DEFINE(HAVE_RINTF, [1], [if rintf is working here])
fi
dnl Checks for library functions.
dnl Check for rintf and functions like that
AC_MSG_CHECKING(for rint)
have_rint=no
AC_TRY_COMPILE([
#include <math.h>
],[
int i; double f; i = rint (f);
],[
have_rint=yes
])
AC_MSG_RESULT($have_rint)
if test x$have_rint = xno; then
AC_CHECK_LIB(m, rint, have_rint=yes, have_rint=no , )
fi
if test x$have_rint = xyes; then
AC_DEFINE(HAVE_RINT, [1], [if rint is working here])
fi
dnl Check for powf and functions like that
AC_MSG_CHECKING(for powf)
have_powf=no
AC_TRY_COMPILE([
#include <math.h>
],[
float i; float f = 2; float j = 2; i = powf (f,j);
],[
have_powf=yes
])
AC_MSG_RESULT($have_powf)
if test x$have_powf = xno; then
AC_CHECK_LIB(m, powf, have_powf=yes, have_powf=no , )
fi
if test x$have_powf = xyes; then
AC_DEFINE(HAVE_POWF, [1], [if powf is working here])
fi
dnl Check for sqrtf and functions like that
AC_MSG_CHECKING(for sqrtf)
have_sqrtf=no
AC_TRY_COMPILE([
#include <math.h>
],[
float i; float f = 2; i = sqrtf (f);
],[
have_sqrtf=yes
])
AC_MSG_RESULT($have_sqrtf)
if test x$have_sqrtf = xno; then
AC_CHECK_LIB(m, sqrtf, have_sqrtf=yes, have_sqrtf=no , )
fi
if test x$have_sqrtf = xyes; then
AC_DEFINE(HAVE_SQRTF, [1], [if sqrtf is working here])
fi
dnl Check for floorf and functions like that
AC_MSG_CHECKING(for floorf)
have_floorf=no
AC_TRY_COMPILE([
#include <math.h>
],[
int i; float f; i = floorf (f);
],[
have_floorf=yes
])
AC_MSG_RESULT($have_floorf)
if test x$have_floorf = xno; then
AC_CHECK_LIB(m, floorf, have_floorf=yes, have_floorf=no , )
fi
if test x$have_floorf = xyes; then
AC_DEFINE(HAVE_FLOORF, [1], [if floorf is working here])
fi
dnl Checks for Additional stuffs.
dnl Set PACKAGE SOURCE DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
dnl Set PACKAGE PREFIX
if test "x${prefix}" = "xNONE"; then
packageprefix=${ac_default_prefix}
else
packageprefix=${prefix}
fi
dnl Set PACKAGE DATA & DOC DIR
packagedatadir=share/games/${PACKAGE}
packagedocdir=share/doc/${PACKAGE}
dnl Set PACKAGE DIRS in config.h.
packagepixmapsdir=${packagedatadir}/pixmaps
packagehelpdir=${packagedatadir}/help
packagemenudir=${packagedatadir}
dnl Subst PACKAGE_DATA_DIR.
NO_PREFIX_PACKAGE_DATA_DIR="${packagedatadir}"
AC_SUBST(NO_PREFIX_PACKAGE_DATA_DIR)
PACKAGE_DATA_DIR="${packageprefix}/${packagedatadir}"
AC_SUBST(PACKAGE_DATA_DIR)
dnl Subst PACKAGE_DOC_DIR.
NO_PREFIX_PACKAGE_DOC_DIR="${packagedocdir}"
AC_SUBST(NO_PREFIX_PACKAGE_DOC_DIR)
PACKAGE_DOC_DIR="${packageprefix}/${packagedocdir}"
AC_SUBST(PACKAGE_DOC_DIR)
dnl Subst PACKAGE_PIXMAPS_DIR.
NO_PREFIX_PACKAGE_PIXMAPS_DIR="${packagepixmapsdir}"
AC_SUBST(NO_PREFIX_PACKAGE_PIXMAPS_DIR)
PACKAGE_PIXMAPS_DIR="${packageprefix}/${packagepixmapsdir}"
AC_SUBST(PACKAGE_PIXMAPS_DIR)
dnl Subst PACKAGE_HELP_DIR.
NO_PREFIX_PACKAGE_HELP_DIR="${packagehelpdir}"
AC_SUBST(NO_PREFIX_PACKAGE_HELP_DIR)
PACKAGE_HELP_DIR="${packageprefix}/${packagehelpdir}"
AC_SUBST(PACKAGE_HELP_DIR)
dnl Subst PACKAGE_MENU_DIR.
NO_PREFIX_PACKAGE_MENU_DIR="${packagemenudir}"
AC_SUBST(NO_PREFIX_PACKAGE_MENU_DIR)
PACKAGE_MENU_DIR="${packageprefix}/${packagemenudir}"
AC_SUBST(PACKAGE_MENU_DIR)
AM_CONDITIONAL(MINGW32, test x$MINGW32 = xyes)
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${packageprefix}/${packagedatadir}")
AC_DEFINE_UNQUOTED(PACKAGE_DOC_DIR, "${packageprefix}/${packagedocdir}")
AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${packageprefix}/${packagepixmapsdir}")
AC_DEFINE_UNQUOTED(PACKAGE_HELP_DIR, "${packageprefix}/${packagehelpdir}")
AC_DEFINE_UNQUOTED(PACKAGE_MENU_DIR, "${packageprefix}/${packagemenudir}")
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
AC_OUTPUT([
Makefile
src/Makefile
include/Makefile
data/Makefile
data/pixmaps/Makefile
data/player/Makefile
data/gfx/Makefile
data/maps/Makefile
data/music/Makefile
data/tileset/Makefile
data/tileset/cemetery/Makefile
data/tileset/cucumber/Makefile
data/tileset/default/Makefile
data/tileset/hell/Makefile
data/tileset/radioactive/Makefile
data/tileset/supermario/Makefile
data/tileset/uccia_garbage/Makefile
data/tileset/classic/Makefile
data/tileset/farm/Makefile
data/tileset/jungle/Makefile
data/tileset/modern/Makefile
data/tileset/sheep/Makefile
data/tileset/tricked/Makefile
data/tileset/zbb_frog/Makefile
])
|