You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bomberclone/configure.in

242 lines
6.1 KiB

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)
AM_INIT_AUTOMAKE(bomberclone, 0.11.1)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_EXEEXT
AC_OBJEXT
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_INLINE
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"
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"
;;
*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 -Wall"
else
CFLAGS="$CFLAGS -Wall -ggdb -O0"
LDFLAGS="$LDFLAGS -ggdb"
AC_MSG_WARN(Enable Debuging)
fi
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([
],[
int i; float f; i = rintf (f);
],[
have_rintf=yes
])
AC_MSG_RESULT($have_rintf)
if test x$have_rintf = xyes; then
AC_CHECK_LIB(m, rintf, have_rintf=yes, have_rintf=no , )
if test x$have_rintf = xyes; then
AC_DEFINE(HAVE_RINTF, [1], [if rintf is working here])
fi
fi
dnl Check for rintf and functions like that
AC_MSG_CHECKING(for rint)
have_rint=no
AC_TRY_COMPILE([
],[
int i; double f; i = rint (f);
],[
have_rint=yes
])
AC_MSG_RESULT($have_rint)
if test x$have_rint = xyes; then
AC_CHECK_LIB(m, rint, have_rint=yes, have_rint=no , )
if test x$have_rint = xyes; then
AC_DEFINE(HAVE_RINT, [1], [if rint is working here])
fi
fi
dnl Check for floorf and functions like that
AC_MSG_CHECKING(for floorf)
have_floorf=no
AC_TRY_COMPILE([
],[
int i; float f; i = floorf (f);
],[
have_floorf=yes
])
AC_MSG_RESULT($have_floorf)
if test x$have_floorf = xyes; then
AC_CHECK_LIB(m, floorf, have_floorf=yes, have_floorf=no , )
if test x$have_floorf = xyes; then
AC_DEFINE(HAVE_FLOORF, [1], [if floorf is working here])
fi
fi
dnl Check for floorf and functions like that
AC_MSG_CHECKING(for floor)
have_floor=no
AC_TRY_COMPILE([
],[
int i; double f; i = floor (f);
],[
have_floor=yes
])
AC_MSG_RESULT($have_floor)
if test x$have_floor = xyes; then
AC_CHECK_LIB(m, floor, have_floor=yes, have_floor=no , )
if test x$have_floor = xyes; then
AC_DEFINE(HAVE_FLOOR, [1], [if floor is working here])
fi
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)
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
])