Commit b51a5b98 authored by Sam Lantinga's avatar Sam Lantinga

Completely removed dependency on automake

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401384
parent 1da8cb01
...@@ -4,13 +4,8 @@ config.cache ...@@ -4,13 +4,8 @@ config.cache
config.log config.log
config.status config.status
configure configure
depcomp
install-sh
libtool libtool
Makefile Makefile
Makefile.in
missing
mkinstalldirs
sdl-config sdl-config
SDL.spec SDL.spec
SDL.qpg SDL.qpg
......
...@@ -15,6 +15,7 @@ distpath = $(srcdir)/.. ...@@ -15,6 +15,7 @@ distpath = $(srcdir)/..
distdir = SDL-@SDL_VERSION@ distdir = SDL-@SDL_VERSION@
distfile = $(distdir).tar.gz distfile = $(distdir).tar.gz
@SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
CC = @CC@ CC = @CC@
INCLUDE = @INCLUDE@ INCLUDE = @INCLUDE@
...@@ -104,6 +105,7 @@ uninstall-man: ...@@ -104,6 +105,7 @@ uninstall-man:
clean: clean:
rm -rf $(objects) rm -rf $(objects)
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
distclean: clean distclean: clean
rm -f Makefile include/SDL_config.h sdl-config rm -f Makefile include/SDL_config.h sdl-config
...@@ -115,6 +117,7 @@ distclean: clean ...@@ -115,6 +117,7 @@ distclean: clean
-name '.#*' \ -name '.#*' \
-exec rm -f {} \; -exec rm -f {} \;
cp include/SDL_config.h.minimal include/SDL_config.h cp include/SDL_config.h.minimal include/SDL_config.h
if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
dist $(distfile): dist $(distfile):
$(SHELL) @ac_aux_dir@/mkinstalldirs $(distdir) $(SHELL) @ac_aux_dir@/mkinstalldirs $(distdir)
......
...@@ -6,8 +6,7 @@ echo "This may take a while ..." ...@@ -6,8 +6,7 @@ echo "This may take a while ..."
# Regenerate configuration files # Regenerate configuration files
cp acinclude.m4 aclocal.m4 cp acinclude.m4 aclocal.m4
autoconf autoconf
# FIXME (cd test; sh autogen.sh)
#(cd test; aclocal; autoconf)
# Run configure for this platform # Run configure for this platform
echo "Now you are ready to run ./configure" echo "Now you are ready to run ./configure"
...@@ -82,6 +82,7 @@ AC_PROG_LIBTOOL ...@@ -82,6 +82,7 @@ AC_PROG_LIBTOOL
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl Check for compiler characteristics dnl Check for compiler characteristics
AC_C_CONST AC_C_CONST
......
Makefile.in aclocal.m4
Makefile autom4te*
configure
config.cache config.cache
config.log config.log
config.status config.status
autom4te* configure
aclocal.m4 Makefile
SDL.dll SDL.dll
stdout.txt stdout.txt
stderr.txt stderr.txt
...@@ -38,3 +37,4 @@ testvidinfo ...@@ -38,3 +37,4 @@ testvidinfo
testwin testwin
testwm testwm
threadwin threadwin
torturethread
AUTOMAKE_OPTIONS = no-dependencies
noinst_PROGRAMS = \
testver testtypes testendian testcpuinfo \
testhread testlock testerror testsem testtimer \
loopwave testcdrom testkeys testvidinfo checkkeys testwin graywin \
testsprite testbitmap testalpha testgamma testpalette testwm \
threadwin testoverlay testoverlay2 testgl testdyngl testjoystick \
testblitspeed
testalpha_SOURCES = testalpha.c
testalpha_LDADD = @MATHLIB@
testgamma_SOURCES = testgamma.c
testgamma_LDADD = @MATHLIB@
testpalette_SOURCES = testpalette.c
testpalette_LDADD = @MATHLIB@
testgl_SOURCES = testgl.c
testgl_LDADD = @GL_LIBS@ @MATHLIB@
# 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 ...@@ -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/'` sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS" CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS" LIBS="$LIBS $SDL_LIBS"
dnl dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl Now check if the installed SDL is sufficiently new. (Also sanity
...@@ -138,6 +140,7 @@ int main (int argc, char *argv[]) ...@@ -138,6 +140,7 @@ int main (int argc, char *argv[])
else else
echo "*** Could not run SDL test program, checking why..." echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS" CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS" LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <stdio.h> #include <stdio.h>
...@@ -162,10 +165,12 @@ int main(int argc, char *argv[]) ...@@ -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 "*** 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" ]) echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
fi fi
fi fi
SDL_CFLAGS="" SDL_CFLAGS=""
SDL_CXXFLAGS=""
SDL_LIBS="" SDL_LIBS=""
ifelse([$3], , :, [$3]) ifelse([$3], , :, [$3])
fi fi
......
#!/bin/sh #!/bin/sh
# #
aclocal # Regenerate configuration files
automake --foreign --add-missing cp acinclude.m4 aclocal.m4
autoconf autoconf
# Run configure for this platform
#./configure $*
echo "Now you are ready to run ./configure"
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(README) AC_INIT(README)
dnl Setup for automake
SDL_VERSION=1.2.7
dnl Detect the canonical host and target build environment dnl Detect the canonical host and target build environment
AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
dnl Setup for automake
AM_INIT_AUTOMAKE(SDL_tests, $SDL_VERSION)
dnl Check for tools dnl Check for tools
AC_PROG_CC AC_PROG_CC
...@@ -18,29 +13,32 @@ dnl Check for compiler environment ...@@ -18,29 +13,32 @@ dnl Check for compiler environment
AC_C_CONST AC_C_CONST
FIXME: add math library for testsprite
dnl Figure out which math library to use dnl Figure out which math library to use
case "$target" in case "$target" in
*-*-cygwin* | *-*-mingw32*) *-*-cygwin* | *-*-mingw32*)
EXE=".exe"
MATHLIB="" MATHLIB=""
SYS_GL_LIBS="-lopengl32" SYS_GL_LIBS="-lopengl32"
;; ;;
*-*-beos*) *-*-beos*)
EXE=""
MATHLIB="" MATHLIB=""
SYS_GL_LIBS="-lGL" SYS_GL_LIBS="-lGL"
;; ;;
*-*-darwin* ) *-*-darwin* )
EXE=""
MATHLIB="" MATHLIB=""
SYS_GL_LIBS="" SYS_GL_LIBS=""
;; ;;
*-*-aix*) *-*-aix*)
EXE=""
if test x$ac_cv_prog_gcc = xyes; then if test x$ac_cv_prog_gcc = xyes; then
CFLAGS="-mthreads" CFLAGS="-mthreads"
fi fi
SYS_GL_LIBS="" SYS_GL_LIBS=""
;; ;;
*-*-mint*) *-*-mint*)
EXE=""
MATHLIB="" MATHLIB=""
AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no) AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
if test "x$OSMESA_CONFIG" = "xyes"; then if test "x$OSMESA_CONFIG" = "xyes"; then
...@@ -53,21 +51,16 @@ case "$target" in ...@@ -53,21 +51,16 @@ case "$target" in
fi fi
;; ;;
*) *)
EXE=""
MATHLIB="-lm" MATHLIB="-lm"
AC_PATH_X SYS_GL_LIBS="-lGL"
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
;; ;;
esac esac
AC_SUBST(EXE)
AC_SUBST(MATHLIB) AC_SUBST(MATHLIB)
dnl Check for SDL dnl Check for SDL
SDL_VERSION=1.2.7
AM_PATH_SDL($SDL_VERSION, AM_PATH_SDL($SDL_VERSION,
:, :,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
...@@ -87,11 +80,11 @@ have_opengl=yes ...@@ -87,11 +80,11 @@ have_opengl=yes
AC_MSG_RESULT($have_opengl) AC_MSG_RESULT($have_opengl)
if test x$have_opengl = xyes; then if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL" CFLAGS="$CFLAGS -DHAVE_OPENGL"
GL_LIBS="$SYS_GL_LIBS" GLLIB="$SYS_GL_LIBS"
else else
GL_LIBS="" GLLIB=""
fi fi
AC_SUBST(GL_LIBS) AC_SUBST(GLLIB)
# Finally create all the generated files dnl Finally create all the generated files
AC_OUTPUT([Makefile]) AC_OUTPUT([Makefile])
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment