From 002eb2cb057f2cdf3fe468012fa5fe864d58f783 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Sun, 14 Mar 2004 16:59:39 +0000 Subject: [PATCH] - fixed auto* stuff a bit, requires automake1.7 SVN-Revision: 216 --- Makefile.am | 5 +++- autogen.sh | 7 +++++ configure.ac | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ data/Makefile.am | 23 ++++++++++++++++ src/Makefile.am | 82 ++++++++++++++++++++++++++++++++++++-------------------- 5 files changed, 160 insertions(+), 30 deletions(-) create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 data/Makefile.am diff --git a/Makefile.am b/Makefile.am index af437a64d..381e3f0a4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1,4 @@ -SUBDIRS = src +SUBDIRS = src data + +# EOF # + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 000000000..cc68549dd --- /dev/null +++ b/autogen.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +aclocal-1.7 +automake-1.7 --force --copy --add-missing +autoconf + +# EOF # diff --git a/configure.ac b/configure.ac new file mode 100644 index 000000000..a720abb47 --- /dev/null +++ b/configure.ac @@ -0,0 +1,73 @@ +dnl =========================================================================== +dnl "configure.in" +dnl +dnl author: Duong-Khang NGUYEN +dnl neoneurone@users.sf.net +dnl =========================================================================== + +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(SuperTux, 0.0.6-cvs) +AC_CONFIG_SRCDIR([src/supertux.c]) +AC_CANONICAL_TARGET +AM_INIT_AUTOMAKE + +SDL_VERSION=1.2.5 + +AC_PROG_CC +AC_PROG_INSTALL +AC_LANG(C) + +dnl Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_CHECK_HEADERS(unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +dnl =========================================================================== +dnl Give advanced users some options to play with + +AC_MSG_CHECKING(for gprof mode) +AC_ARG_ENABLE(gprof, + AC_HELP_STRING([--enable-gprof], [enable GNU profiling support],, enable_gprof="no")) +if test "x${enable_gprof}" != "xno"; then + CFLAGS="$CFLAGS -pg" + AC_MSG_RESULT([enabled]) +else + AC_MSG_RESULT([disabled]) +fi + +AC_MSG_CHECKING(for debug mode) +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], [enable debugging mode],, enable_debug="no")) +if test "x${enable_debug}" != "xno"; then + AC_MSG_RESULT([enabled]) +else + AC_MSG_RESULT([disabled]) +fi + +dnl =========================================================================== +dnl Check for SDL +AM_PATH_SDL($SDL_VERSION, + :, + AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) + +CFLAGS="$CFLAGS $SDL_CFLAGS" +LDFLAGS="$LDFLAGS $SDL_LIBS" + +dnl Checks for additional libraries. +AC_CHECK_LIB(SDL_mixer, SDL_OpenAudio, ,AC_MSG_ERROR(SDL_mixer library required)) +AC_CHECK_LIB(SDL_image, IMG_Load, ,AC_MSG_ERROR(SDL_image library required)) +AC_CHECK_LIB(GL, glBegin, ,AC_MSG_ERROR(GL library required)) + +# FIXME: Evil +CFLAGS="-DDATA_PREFIX=\\\"$PWD/data\\\" -DLINUX" + +dnl Checks for library functions. +AC_CHECK_FUNCS(mkdir strdup strstr) + +AC_OUTPUT(Makefile src/Makefile data/Makefile) + +# EOF # diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 000000000..e18c4aab0 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,23 @@ + +EXTRA_DIST = \ + $(wildcard sounds/*.wav) \ + $(wildcard images/background/*.png) \ + $(wildcard images/highscore/*.png) \ + $(wildcard images/icons/*.png) \ + $(wildcard images/intro/*.png) \ + $(wildcard images/leveleditor/*.png) \ + $(wildcard images/shared/*.png) \ + $(wildcard images/status/*.png) \ + $(wildcard images/themes/*/*.png) \ + $(wildcard images/titlethemes/*.png) \ + levels/default/info.png \ + levels/default/info \ + $(wildcard levels/default/*.dat) \ + $(wildcard music/*.mod) \ + $(wildcard music/*.MOD) \ + $(wildcard sounds/*.wav) \ + CREDITS + +nobase_dist_pkgdata_DATA = $(EXTRA_DIST) + +# EOF # diff --git a/src/Makefile.am b/src/Makefile.am index af4f2f246..027cf30b8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,32 +1,56 @@ bin_PROGRAMS = supertux -supertux_SOURCES = \ -badguy.c \ -collision.c \ -high_scores.c \ -leveleditor.c \ -player.c \ -setup.c \ -supertux.c \ -timer.c \ -world.c \ -bitmask.c \ -gameloop.c \ -intro.c \ -menu.c \ -scene.c \ -sound.c \ -text.c \ -title.c \ -button.c \ -globals.c \ -level.c \ -physic.c \ -screen.c \ -special.c \ -texture.c \ -type.c - -#INCLUDES = $(shell sdl-config --cflags) -#CFLAGS = $(SDL_CFLAGS) -DDATA_PREFIX=\"$(PWD)/../../data\" -DLINUX +supertux_SOURCES = \ + badguy.c \ + badguy.h \ + bitmask.c \ + bitmask.h \ + button.c \ + button.h \ + collision.c \ + collision.h \ + defines.h \ + gameloop.c \ + gameloop.h \ + globals.c \ + globals.h \ + high_scores.c \ + high_scores.h \ + intro.c \ + intro.h \ + level.c \ + level.h \ + leveleditor.c \ + leveleditor.h \ + menu.c \ + menu.h \ + physic.c \ + physic.h \ + player.c \ + player.h \ + scene.c \ + scene.h \ + screen.c \ + screen.h \ + setup.c \ + setup.h \ + sound.c \ + sound.h \ + special.c \ + special.h \ + supertux.c \ + supertux.h \ + text.c \ + text.h \ + texture.c \ + texture.h \ + timer.c \ + timer.h \ + title.c \ + title.h \ + type.c \ + type.h \ + world.c \ + world.h +# EOF # -- 2.11.0