From d47da18958b5214def5127e201f60668c566d9bb Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 25 Aug 2013 17:07:35 -0400 Subject: Moved to an autoconf-based build system --- configure.ac | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f311aa6 --- /dev/null +++ b/configure.ac @@ -0,0 +1,44 @@ +AC_INIT(mazeoflife, version-2.0) +AC_PREREQ([2.59]) +AM_INIT_AUTOMAKE([1.10 no-define foreign]) +AC_PROG_CXX +AC_CONFIG_FILES([Makefile]) + +dnl Check for SDL +SDL_VERSION=1.2.0 +AM_PATH_SDL($SDL_VERSION, + :, + AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) +) +CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" +LIBS="$LIBS $SDL_LIBS" + +dnl Check for SDL_ttf +AC_ARG_WITH([sdl-ttf-include-path], + [AS_HELP_STRING([--with-sdl-ttf-include-path], + [location of the SDL_ttf headers, defaults to /usr/include/SDL])], + [SDLTTF_CXXFLAGS="-I$withval"], + [SDLTTF_CXXFLAGS="-I/usr/include/SDL"]) +AC_SUBST([SDLTTF_CXXFLAGS]) + +AC_ARG_WITH([sdl-ttf-lib-path], + [AS_HELP_STRING([--with-sdl-ttf-lib-path], [location of the SDL_ttf library])], + [SDLTTF_LIBS="-L$withval -lsdl_ttf"], + [SDLTTF_LIBS="-lsdl_ttf"]) +AC_SUBST([SDLTTF_LIBS]) + +dnl Check for SDL_net +AC_ARG_WITH([sdl-net-include-path], + [AS_HELP_STRING([--with-sdl-net-include-path], + [location of the SDL_net headers, defaults to /usr/include/SDL])], + [SDLNET_CXXFLAGS="-I$withval"], + [SDLNET_CXXFLAGS="-I/usr/include/SDL"]) +AC_SUBST([SDLNET_CXXFLAGS]) + +AC_ARG_WITH([sdl-net-lib-path], + [AS_HELP_STRING([--with-sdl-net-lib-path], [location of the SDL_net library])], + [SDLNET_LIBS="-L$withval -lsdl_net"], + [SDLNET_LIBS="-lsdl_net"]) +AC_SUBST([SDLNET_LIBS]) + +AC_OUTPUT \ No newline at end of file -- cgit 1.4.1