Skip to content
Permalink
Browse files

Completely removed dependency on automake

  • Loading branch information
slouken committed Feb 20, 2006
1 parent d4ffadf commit 1941c1f6a5cfad926f9d3cf15172ee91b5125f6b
Showing with 142 additions and 393 deletions.
  1. +0 −5 .cvsignore
  2. +3 −0 Makefile.in
  3. +1 −2 autogen.sh
  4. +1 −0 configure.in
  5. +5 −5 test/.cvsignore
  6. +0 −18 test/Makefile.am
  7. +111 −0 test/Makefile.in
  8. +5 −0 test/acinclude.m4
  9. +2 −6 test/autogen.sh
  10. +14 −21 test/configure.in
  11. +0 −336 test/missing
@@ -4,13 +4,8 @@ config.cache
config.log
config.status
configure
depcomp
install-sh
libtool
Makefile
Makefile.in
missing
mkinstalldirs
sdl-config
SDL.spec
SDL.qpg
@@ -15,6 +15,7 @@ distpath = $(srcdir)/..
distdir = SDL-@SDL_VERSION@
distfile = $(distdir).tar.gz

@SET_MAKE@
SHELL = @SHELL@
CC = @CC@
INCLUDE = @INCLUDE@
@@ -104,6 +105,7 @@ uninstall-man:

clean:
rm -rf $(objects)
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi

distclean: clean
rm -f Makefile include/SDL_config.h sdl-config
@@ -115,6 +117,7 @@ distclean: clean
-name '.#*' \
-exec rm -f {} \;
cp include/SDL_config.h.minimal include/SDL_config.h
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi

dist $(distfile):
$(SHELL) @ac_aux_dir@/mkinstalldirs $(distdir)
@@ -6,8 +6,7 @@ echo "This may take a while ..."
# Regenerate configuration files
cp acinclude.m4 aclocal.m4
autoconf
# FIXME
#(cd test; aclocal; autoconf)
(cd test; sh autogen.sh)

# Run configure for this platform
echo "Now you are ready to run ./configure"
@@ -82,6 +82,7 @@ AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET

dnl Check for compiler characteristics
AC_C_CONST
@@ -1,11 +1,10 @@
Makefile.in
Makefile
configure
aclocal.m4
autom4te*
config.cache
config.log
config.status
autom4te*
aclocal.m4
configure
Makefile
SDL.dll
stdout.txt
stderr.txt
@@ -38,3 +37,4 @@ testvidinfo
testwin
testwm
threadwin
torturethread

This file was deleted.

@@ -0,0 +1,111 @@
# Makefile to build the SDL tests

srcdir = @srcdir@

CC = @CC@
EXE = @EXE@
CFLAGS = @CFLAGS@
LIBS = @LIBS@

TARGETS = checkkeys$(EXE) graywin$(EXE) loopwave$(EXE) testalpha$(EXE) testbitmap$(EXE) testblitspeed$(EXE) testcdrom$(EXE) testcpuinfo$(EXE) testdyngl$(EXE) testendian$(EXE) testerror$(EXE) testgamma$(EXE) testgl$(EXE) testhread$(EXE) testjoystick$(EXE) testkeys$(EXE) testlock$(EXE) testoverlay2$(EXE) testoverlay$(EXE) testpalette$(EXE) testsem$(EXE) testsprite$(EXE) testtimer$(EXE) testtypes$(EXE) testver$(EXE) testvidinfo$(EXE) testwin$(EXE) testwm$(EXE) threadwin$(EXE) torturethread$(EXE)

all: $(TARGETS)

checkkeys$(EXE): $(srcdir)/checkkeys.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

graywin$(EXE): $(srcdir)/graywin.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

loopwave$(EXE): $(srcdir)/loopwave.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testalpha$(EXE): $(srcdir)/testalpha.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@

testbitmap$(EXE): $(srcdir)/testbitmap.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testblitspeed$(EXE): $(srcdir)/testblitspeed.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testcdrom$(EXE): $(srcdir)/testcdrom.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testcpuinfo$(EXE): $(srcdir)/testcpuinfo.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testdyngl$(EXE): $(srcdir)/testdyngl.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testendian$(EXE): $(srcdir)/testendian.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testerror$(EXE): $(srcdir)/testerror.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testgamma$(EXE): $(srcdir)/testgamma.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@

testgl$(EXE): $(srcdir)/testgl.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@

testhread$(EXE): $(srcdir)/testhread.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testjoystick$(EXE): $(srcdir)/testjoystick.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testkeys$(EXE): $(srcdir)/testkeys.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testlock$(EXE): $(srcdir)/testlock.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testoverlay2$(EXE): $(srcdir)/testoverlay2.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testoverlay$(EXE): $(srcdir)/testoverlay.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testpalette$(EXE): $(srcdir)/testpalette.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@

testsem$(EXE): $(srcdir)/testsem.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testsprite$(EXE): $(srcdir)/testsprite.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@

testtimer$(EXE): $(srcdir)/testtimer.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testtypes$(EXE): $(srcdir)/testtypes.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testver$(EXE): $(srcdir)/testver.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testvidinfo$(EXE): $(srcdir)/testvidinfo.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testwin$(EXE): $(srcdir)/testwin.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

testwm$(EXE): $(srcdir)/testwm.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

threadwin$(EXE): $(srcdir)/threadwin.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)

torturethread$(EXE): $(srcdir)/torturethread.c
$(CC) -o $@ $? $(CFLAGS) $(LIBS)


clean:
rm -f $(TARGETS)

distclean: clean
rm -f Makefile
rm -f config.status config.cache config.log
rm -rf $(srcdir)/autom4te*
@@ -52,8 +52,10 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
@@ -138,6 +140,7 @@ int main (int argc, char *argv[])
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
@@ -162,10 +165,12 @@ int main(int argc, char *argv[])
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_CXXFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
@@ -1,9 +1,5 @@
#!/bin/sh
#
aclocal
automake --foreign --add-missing
# Regenerate configuration files
cp acinclude.m4 aclocal.m4
autoconf

# Run configure for this platform
#./configure $*
echo "Now you are ready to run ./configure"
@@ -1,15 +1,10 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(README)

dnl Setup for automake
SDL_VERSION=1.2.7

dnl Detect the canonical host and target build environment
AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
AC_CANONICAL_SYSTEM

dnl Setup for automake
AM_INIT_AUTOMAKE(SDL_tests, $SDL_VERSION)

dnl Check for tools

AC_PROG_CC
@@ -18,29 +13,32 @@ dnl Check for compiler environment

AC_C_CONST

FIXME: add math library for testsprite

dnl Figure out which math library to use
case "$target" in
*-*-cygwin* | *-*-mingw32*)
EXE=".exe"
MATHLIB=""
SYS_GL_LIBS="-lopengl32"
;;
*-*-beos*)
EXE=""
MATHLIB=""
SYS_GL_LIBS="-lGL"
;;
*-*-darwin* )
EXE=""
MATHLIB=""
SYS_GL_LIBS=""
;;
*-*-aix*)
EXE=""
if test x$ac_cv_prog_gcc = xyes; then
CFLAGS="-mthreads"
fi
SYS_GL_LIBS=""
;;
*-*-mint*)
EXE=""
MATHLIB=""
AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
if test "x$OSMESA_CONFIG" = "xyes"; then
@@ -53,21 +51,16 @@ case "$target" in
fi
;;
*)
EXE=""
MATHLIB="-lm"
AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
CFLAGS="$CFLAGS $X_CFLAGS"
SYS_GL_LIBS="$X_LIBS -lGL"
else
SYS_GL_LIBS="-lGL"
fi
SYS_GL_LIBS="-lGL"
;;
esac
AC_SUBST(EXE)
AC_SUBST(MATHLIB)

dnl Check for SDL

SDL_VERSION=1.2.7
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
@@ -87,11 +80,11 @@ have_opengl=yes
AC_MSG_RESULT($have_opengl)
if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GL_LIBS="$SYS_GL_LIBS"
GLLIB="$SYS_GL_LIBS"
else
GL_LIBS=""
GLLIB=""
fi
AC_SUBST(GL_LIBS)
AC_SUBST(GLLIB)

# Finally create all the generated files
dnl Finally create all the generated files
AC_OUTPUT([Makefile])

0 comments on commit 1941c1f

Please sign in to comment.