- fixed auto* stuff a bit, requires automake1.7
authorIngo Ruhnke <grumbel@gmx.de>
Sun, 14 Mar 2004 16:59:39 +0000 (16:59 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Sun, 14 Mar 2004 16:59:39 +0000 (16:59 +0000)
SVN-Revision: 216

Makefile.am
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
data/Makefile.am [new file with mode: 0644]
src/Makefile.am

index af437a6..381e3f0 100644 (file)
@@ -1 +1,4 @@
-SUBDIRS = src
+SUBDIRS = src data
+
+# EOF #
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..cc68549
--- /dev/null
@@ -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 (file)
index 0000000..a720abb
--- /dev/null
@@ -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 (file)
index 0000000..e18c4aa
--- /dev/null
@@ -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 #
index af4f2f2..027cf30 100644 (file)
@@ -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 #