initial automake (don't expect this to work just yet)

This commit is contained in:
Glenn Maynard
2003-02-20 00:38:59 +00:00
parent f3b1cf1f2e
commit 87ee391649
3 changed files with 117 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# Need 1.7 for subdir support. (Well, 1.4 doesn't work, I don't know if anything between does.)
AUTOMAKE_OPTIONS = 1.7 foreign
SUBDIRS = src
ACLOCAL_AMFLAGS = -I autoconf/m4
+80
View File
@@ -0,0 +1,80 @@
#!/bin/sh
# $Id$
# Run this to generate configure, the initial makefiles, etc.
#
# Source (non-CVS) distributions should come with a "configure" script
# already generated--people simply compiling the program shouldn't
# need autoconf and friends installed.
#
# CVS only contains the source files: Makefile.am, configure.ac, and
# so on.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="stepmania"
# Actually, there's a chance we'll work with later versions, too, but it's
# not worth bending over backward to try to detect it right now.
ACLOCAL=aclocal-1.7
AUTOMAKE=automake-1.7
ACLOCAL_OPTIONS="-I autoconf/m4/"
AUTOMAKE_OPTIONS=-a
AUTOCONF=autoconf
(test -f $srcdir/configure.ac \
&& test -d $srcdir/src) || {
echo -n "**Error**: Directory \"$srcdir\" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
DIE=0
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/"
DIE=1
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.7.2.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || ($ACLOCAL --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.7.2.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
$ACLOCAL $ACLOCAL_OPTIONS
$AUTOCONF
$AUTOMAKE $AUTOMAKE_OPTIONS
#make -f Makefile.am srcdir=. acinclude.m4
#if test -z "$*"; then
# echo "**Warning**: I am going to run \`configure' with no arguments."
# echo "If you wish to pass any to it, please specify them on the"
# echo \`$0\'" command line."
# echo
#fi
+32
View File
@@ -0,0 +1,32 @@
# only tested with autoconf 2.57
AC_PREREQ(2.53)
AC_INIT(src/StepMania.cpp)
AC_CONFIG_AUX_DIR(autoconf)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(StepMania, 3.001)
AM_CONFIG_HEADER(src/config.h)
MDL_HAVE_OPENGL
AC_SEARCH_LIBS(IMG_Load, [SDL_image], have_SDL_image=yes, have_SDL_image=no)
# Since we link statically against SDL_sound, we need to link all
# of its support libraries ourself.
AC_SEARCH_LIBS(vorbis_comment_add, [vorbis], have_vorbis=yes, have_vorbis=no)
AC_SEARCH_LIBS(ogg_stream_init, [ogg], have_ogg=yes, have_ogg=no)
AC_SEARCH_LIBS(ov_open, [vorbisfile], have_vorbisfile=yes, have_vorbisfile=no)
AC_SEARCH_LIBS(mad_synth_init, [mad], have_mad=yes, have_mad=no)
AC_SEARCH_LIBS(id3_tag_parse, [id3tag], have_mad=yes, have_mad=no)
AC_SEARCH_LIBS(deflate, [z], have_libz=yes, have_libz=no)
AC_PROG_CC
AC_PROG_CXX
AM_PATH_SDL
# sdl-config puts -L/usr/lib in the library search path, which reorders things
# in a way that breaks some configurations.
SDL_LIBS="`echo $SDL_LIBS | sed 's_-L/usr/lib/\?[[ $]]__'`"
AC_OUTPUT([Makefile src/Makefile])