~ubuntu-branches/ubuntu/trusty/orbital-eunuchs-sniper/trusty-proposed

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
# Process this file with autoconf to produce a configure script.
AC_INIT(orbital_eunuchs_sniper, 1.30, zakk@timedoctor.org)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(orbital_eunuchs_sniper, 1.30)
AC_CONFIG_SRCDIR([src/snipe2d.cpp])
AM_CONFIG_HEADER([config.h])

#This requires Autoconf 2.50 or later.  2.13 or earlier not supported.
AC_PREREQ(2.50)

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S


# Checks for libraries.
AC_PATH_XTRA
AC_CHECK_LIB([SDL], [SDL_Init], [], [AC_MSG_ERROR([SDL is required])])
AC_CHECK_LIB([SDL_image], [IMG_Load], [], [AC_MSG_ERROR([SDL_image is required])])
AC_CHECK_LIB([SDL_mixer], [Mix_OpenAudio], [], [AC_MSG_ERROR([SDL_mixer is required])])
AC_CHECK_LIB([HeartOfGold],[tea])


#This is needed for IRIX (why?).
#AC_CHECK_LIB([gen], [main])


# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
AC_CHECK_HEADERS([SDL/SDL.h])
AC_CHECK_HEADERS([SDL/SDL_image.h])
AC_CHECK_HEADERS([SDL/SDL_mixer.h])


# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl Enable warnings from GCC
if test "$GCC" = "yes"; then
  CPPFLAGS="-Wall $CPPFLAGS"
fi

# Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit floor memset mkdir sqrt strdup])

dnl Figure out where the datadir actually is
if test "x${datadir}" = 'x${prefix}/share' || test "x${datadir}" = 'x${datarootdir}'; then
  if test "x${prefix}" = "xNONE"; then
    runtime_datadir="${ac_default_prefix}/share"
  else
    runtime_datadir="${prefix}/share"
  fi
else
  runtime_datadir="${datadir}"
fi

#Package hackage.  Ask autoconf team to include --gamedir as standard option?
AC_ARG_WITH(games-dir,
 [  --with-games-dir=path   Set path to games directory (default PREFIX/games)],
 ,dnl default action of assigning shell value
 with_games_dir="${runtime_datadir}/games"
)
AC_SUBST(datadir,"${with_games_dir}")
AC_DEFINE_UNQUOTED([GAMEDATADIR], "${datadir}/$PACKAGE_NAME",
                               [Game data directory])


#These should be automagically determined somehow.
#CPU Instruction Set.  Should be automagic.
AC_SUBST(CPU_IS,`uname -m`)


echo $ac_n "ordering crap from http://www.amazon.com/gp/registry/296ST2NHEBO0Z" 1>&6
#sleep 1
#echo $ac_n ".$ac_c" 1>&6
#sleep 1
#echo $ac_n ".$ac_c" 1>&6
#sleep 1
#echo $ac_n ".$ac_c" 1>&6
#sleep 1
#echo $ac_n ".$ac_c" 1>&6
#sleep 1
AC_MSG_RESULT([ complete!])

AC_CONFIG_FILES([Makefile src/Makefile bin/Makefile])
AC_OUTPUT