1
# Process this file with autoconf to produce a configure script.
2
AC_INIT(orbital_eunuchs_sniper, 1.30, zakk@timedoctor.org)
4
AM_INIT_AUTOMAKE(orbital_eunuchs_sniper, 1.30)
5
AC_CONFIG_SRCDIR([src/snipe2d.cpp])
6
AM_CONFIG_HEADER([config.h])
8
#This requires Autoconf 2.50 or later. 2.13 or earlier not supported.
11
# Checks for programs.
18
# Checks for libraries.
20
AC_CHECK_LIB([SDL], [SDL_Init], [], [AC_MSG_ERROR([SDL is required])])
21
AC_CHECK_LIB([SDL_image], [IMG_Load], [], [AC_MSG_ERROR([SDL_image is required])])
22
AC_CHECK_LIB([SDL_mixer], [Mix_OpenAudio], [], [AC_MSG_ERROR([SDL_mixer is required])])
23
AC_CHECK_LIB([HeartOfGold],[tea])
26
#This is needed for IRIX (why?).
27
#AC_CHECK_LIB([gen], [main])
30
# Checks for header files.
32
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
33
AC_CHECK_HEADERS([SDL/SDL.h])
34
AC_CHECK_HEADERS([SDL/SDL_image.h])
35
AC_CHECK_HEADERS([SDL/SDL_mixer.h])
38
# Checks for typedefs, structures, and compiler characteristics.
41
dnl Enable warnings from GCC
42
if test "$GCC" = "yes"; then
43
CPPFLAGS="-Wall $CPPFLAGS"
46
# Checks for library functions.
48
AC_CHECK_FUNCS([atexit floor memset mkdir sqrt strdup])
50
dnl Figure out where the datadir actually is
51
if test "x${datadir}" = 'x${prefix}/share' || test "x${datadir}" = 'x${datarootdir}'; then
52
if test "x${prefix}" = "xNONE"; then
53
runtime_datadir="${ac_default_prefix}/share"
55
runtime_datadir="${prefix}/share"
58
runtime_datadir="${datadir}"
61
#Package hackage. Ask autoconf team to include --gamedir as standard option?
62
AC_ARG_WITH(games-dir,
63
[ --with-games-dir=path Set path to games directory (default PREFIX/games)],
64
,dnl default action of assigning shell value
65
with_games_dir="${runtime_datadir}/games"
67
AC_SUBST(datadir,"${with_games_dir}")
68
AC_DEFINE_UNQUOTED([GAMEDATADIR], "${datadir}/$PACKAGE_NAME",
69
[Game data directory])
72
#These should be automagically determined somehow.
73
#CPU Instruction Set. Should be automagic.
74
AC_SUBST(CPU_IS,`uname -m`)
77
echo $ac_n "ordering crap from http://www.amazon.com/gp/registry/296ST2NHEBO0Z" 1>&6
79
#echo $ac_n ".$ac_c" 1>&6
81
#echo $ac_n ".$ac_c" 1>&6
83
#echo $ac_n ".$ac_c" 1>&6
85
#echo $ac_n ".$ac_c" 1>&6
87
AC_MSG_RESULT([ complete!])
89
AC_CONFIG_FILES([Makefile src/Makefile bin/Makefile])