| 1 |
# Process this file with autoconf to produce a configure script. |
| 2 |
AC_INIT(orbital_eunuchs_sniper, 1.30, [email protected]) |
| 3 |
AC_CANONICAL_SYSTEM |
| 4 |
AM_INIT_AUTOMAKE(orbital_eunuchs_sniper, 1.30) |
| 5 |
AC_CONFIG_SRCDIR([src/snipe2d.cpp]) |
| 6 |
AM_CONFIG_HEADER([config.h]) |
| 7 |
|
| 8 |
#This requires Autoconf 2.50 or later. 2.13 or earlier not supported. |
| 9 |
AC_PREREQ(2.50) |
| 10 |
|
| 11 |
# Checks for programs. |
| 12 |
AC_PROG_CXX |
| 13 |
AC_PROG_CC |
| 14 |
AC_PROG_INSTALL |
| 15 |
AC_PROG_LN_S |
| 16 |
|
| 17 |
|
| 18 |
# Checks for libraries. |
| 19 |
AC_PATH_XTRA |
| 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]) |
| 24 |
|
| 25 |
|
| 26 |
#This is needed for IRIX (why?). |
| 27 |
#AC_CHECK_LIB([gen], [main]) |
| 28 |
|
| 29 |
|
| 30 |
# Checks for header files. |
| 31 |
AC_HEADER_STDC |
| 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]) |
| 36 |
|
| 37 |
|
| 38 |
# Checks for typedefs, structures, and compiler characteristics. |
| 39 |
AC_C_CONST |
| 40 |
|
| 41 |
dnl Enable warnings from GCC |
| 42 |
if test "$GCC" = "yes"; then |
| 43 |
CPPFLAGS="-Wall $CPPFLAGS" |
| 44 |
fi |
| 45 |
|
| 46 |
# Checks for library functions. |
| 47 |
AC_FUNC_VPRINTF |
| 48 |
AC_CHECK_FUNCS([atexit floor memset mkdir sqrt strdup]) |
| 49 |
|
| 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" |
| 54 |
else |
| 55 |
runtime_datadir="${prefix}/share" |
| 56 |
fi |
| 57 |
else |
| 58 |
runtime_datadir="${datadir}" |
| 59 |
fi |
| 60 |
|
| 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" |
| 66 |
) |
| 67 |
AC_SUBST(datadir,"${with_games_dir}") |
| 68 |
AC_DEFINE_UNQUOTED([GAMEDATADIR], "${datadir}/$PACKAGE_NAME", |
| 69 |
[Game data directory]) |
| 70 |
|
| 71 |
|
| 72 |
#These should be automagically determined somehow. |
| 73 |
#CPU Instruction Set. Should be automagic. |
| 74 |
AC_SUBST(CPU_IS,`uname -m`) |
| 75 |
|
| 76 |
|
| 77 |
echo $ac_n "ordering crap from http://www.amazon.com/gp/registry/296ST2NHEBO0Z" 1>&6 |
| •78 |
#sleep 1 |
| 79 |
#echo $ac_n ".$ac_c" 1>&6 |
| 80 |
#sleep 1 |
| 81 |
#echo $ac_n ".$ac_c" 1>&6 |
| 82 |
#sleep 1 |
| 83 |
#echo $ac_n ".$ac_c" 1>&6 |
| 84 |
#sleep 1 |
| 85 |
#echo $ac_n ".$ac_c" 1>&6 |
| 86 |
#sleep 1 |
| 87 |
AC_MSG_RESULT([ complete!]) |
| 88 |
|
| •89 |
AC_CONFIG_FILES([Makefile src/Makefile bin/Makefile]) |
| 90 |
AC_OUTPUT |