Completely removed dependency on automake
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401384
This commit is contained in:
parent
1da8cb0143
commit
b51a5b98fc
11 changed files with 142 additions and 393 deletions
|
@ -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)/..
|
||||||
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:
|
||||||
|
|
||||||
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
|
||||||
-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 ..."
|
||||||
# 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
|
||||||
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
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
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
|
||||||
testwin
|
testwin
|
||||||
testwm
|
testwm
|
||||||
threadwin
|
threadwin
|
||||||
|
torturethread
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
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@
|
|
111
test/Makefile.in
Normal file
111
test/Makefile.in
Normal file
|
@ -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/'`
|
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[])
|
||||||
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[])
|
||||||
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
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#!/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"
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
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
|
||||||
|
|
||||||
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
|
||||||
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
|
||||||
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])
|
||||||
|
|
336
test/missing
336
test/missing
|
@ -1,336 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# Common stub for a few missing GNU programs while installing.
|
|
||||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
|
||||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
||||||
# 02111-1307, USA.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo 1>&2 "Try \`$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
run=:
|
|
||||||
|
|
||||||
# In the cases where this matters, `missing' is being run in the
|
|
||||||
# srcdir already.
|
|
||||||
if test -f configure.ac; then
|
|
||||||
configure_ac=configure.ac
|
|
||||||
else
|
|
||||||
configure_ac=configure.in
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--run)
|
|
||||||
# Try to run requested program, and just exit if it succeeds.
|
|
||||||
run=
|
|
||||||
shift
|
|
||||||
"$@" && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If it does not exist, or fails to run (possibly an outdated version),
|
|
||||||
# try to emulate it.
|
|
||||||
case "$1" in
|
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
|
||||||
echo "\
|
|
||||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
|
||||||
|
|
||||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
|
||||||
error status if there is no known handling for PROGRAM.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h, --help display this help and exit
|
|
||||||
-v, --version output version information and exit
|
|
||||||
--run try to run the given command, and emulate it if it fails
|
|
||||||
|
|
||||||
Supported PROGRAM values:
|
|
||||||
aclocal touch file \`aclocal.m4'
|
|
||||||
autoconf touch file \`configure'
|
|
||||||
autoheader touch file \`config.h.in'
|
|
||||||
automake touch all \`Makefile.in' files
|
|
||||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
|
||||||
flex create \`lex.yy.c', if possible, from existing .c
|
|
||||||
help2man touch the output file
|
|
||||||
lex create \`lex.yy.c', if possible, from existing .c
|
|
||||||
makeinfo touch the output file
|
|
||||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
|
||||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
|
||||||
echo "missing 0.4 - GNU automake"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*)
|
|
||||||
echo 1>&2 "$0: Unknown \`$1' option"
|
|
||||||
echo 1>&2 "Try \`$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
aclocal*)
|
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
||||||
# We have it, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
|
||||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
|
||||||
any GNU archive site."
|
|
||||||
touch aclocal.m4
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoconf)
|
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
||||||
# We have it, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`${configure_ac}'. You might want to install the
|
|
||||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
|
||||||
archive site."
|
|
||||||
touch configure
|
|
||||||
;;
|
|
||||||
|
|
||||||
autoheader)
|
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
||||||
# We have it, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
|
||||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
|
||||||
from any GNU archive site."
|
|
||||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
|
||||||
test -z "$files" && files="config.h"
|
|
||||||
touch_files=
|
|
||||||
for f in $files; do
|
|
||||||
case "$f" in
|
|
||||||
*:*) touch_files="$touch_files "`echo "$f" |
|
|
||||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
|
||||||
*) touch_files="$touch_files $f.in";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
touch $touch_files
|
|
||||||
;;
|
|
||||||
|
|
||||||
automake*)
|
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
||||||
# We have it, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
|
||||||
You might want to install the \`Automake' and \`Perl' packages.
|
|
||||||
Grab them from any GNU archive site."
|
|
||||||
find . -type f -name Makefile.am -print |
|
|
||||||
sed 's/\.am$/.in/' |
|
|
||||||
while read f; do touch "$f"; done
|
|
||||||
;;
|
|
||||||
|
|
||||||
autom4te)
|
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
||||||
# We have it, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
|
||||||
system. You might have modified some files without having the
|
|
||||||
proper tools for further handling them.
|
|
||||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
|
||||||
archive site."
|
|
||||||
|
|
||||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
|
||||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
|
||||||
if test -f "$file"; then
|
|
||||||
touch $file
|
|
||||||
else
|
|
||||||
test -z "$file" || exec >$file
|
|
||||||
echo "#! /bin/sh"
|
|
||||||
echo "# Created by GNU Automake missing as a replacement of"
|
|
||||||
echo "# $ $@"
|
|
||||||
echo "exit 0"
|
|
||||||
chmod +x $file
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
bison|yacc)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a \`.y' file. You may need the \`Bison' package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
\`Bison' from any GNU archive site."
|
|
||||||
rm -f y.tab.c y.tab.h
|
|
||||||
if [ $# -ne 1 ]; then
|
|
||||||
eval LASTARG="\${$#}"
|
|
||||||
case "$LASTARG" in
|
|
||||||
*.y)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
|
||||||
if [ -f "$SRCFILE" ]; then
|
|
||||||
cp "$SRCFILE" y.tab.c
|
|
||||||
fi
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
|
||||||
if [ -f "$SRCFILE" ]; then
|
|
||||||
cp "$SRCFILE" y.tab.h
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if [ ! -f y.tab.h ]; then
|
|
||||||
echo >y.tab.h
|
|
||||||
fi
|
|
||||||
if [ ! -f y.tab.c ]; then
|
|
||||||
echo 'main() { return 0; }' >y.tab.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
lex|flex)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a \`.l' file. You may need the \`Flex' package
|
|
||||||
in order for those modifications to take effect. You can get
|
|
||||||
\`Flex' from any GNU archive site."
|
|
||||||
rm -f lex.yy.c
|
|
||||||
if [ $# -ne 1 ]; then
|
|
||||||
eval LASTARG="\${$#}"
|
|
||||||
case "$LASTARG" in
|
|
||||||
*.l)
|
|
||||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
|
||||||
if [ -f "$SRCFILE" ]; then
|
|
||||||
cp "$SRCFILE" lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if [ ! -f lex.yy.c ]; then
|
|
||||||
echo 'main() { return 0; }' >lex.yy.c
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
help2man)
|
|
||||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
|
||||||
# We have it, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a dependency of a manual page. You may need the
|
|
||||||
\`Help2man' package in order for those modifications to take
|
|
||||||
effect. You can get \`Help2man' from any GNU archive site."
|
|
||||||
|
|
||||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
|
||||||
if test -z "$file"; then
|
|
||||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
|
||||||
fi
|
|
||||||
if [ -f "$file" ]; then
|
|
||||||
touch $file
|
|
||||||
else
|
|
||||||
test -z "$file" || exec >$file
|
|
||||||
echo ".ab help2man is required to generate this page"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
makeinfo)
|
|
||||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
|
||||||
# We have makeinfo, but it failed.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is missing on your system. You should only need it if
|
|
||||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
|
||||||
indirectly affecting the aspect of the manual. The spurious
|
|
||||||
call might also be the consequence of using a buggy \`make' (AIX,
|
|
||||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
|
||||||
the \`GNU make' package. Grab either from any GNU archive site."
|
|
||||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
|
||||||
if test -z "$file"; then
|
|
||||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
|
||||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
|
||||||
fi
|
|
||||||
touch $file
|
|
||||||
;;
|
|
||||||
|
|
||||||
tar)
|
|
||||||
shift
|
|
||||||
if test -n "$run"; then
|
|
||||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We have already tried tar in the generic part.
|
|
||||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
|
||||||
# messages.
|
|
||||||
if (gnutar --version > /dev/null 2>&1); then
|
|
||||||
gnutar "$@" && exit 0
|
|
||||||
fi
|
|
||||||
if (gtar --version > /dev/null 2>&1); then
|
|
||||||
gtar "$@" && exit 0
|
|
||||||
fi
|
|
||||||
firstarg="$1"
|
|
||||||
if shift; then
|
|
||||||
case "$firstarg" in
|
|
||||||
*o*)
|
|
||||||
firstarg=`echo "$firstarg" | sed s/o//`
|
|
||||||
tar "$firstarg" "$@" && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case "$firstarg" in
|
|
||||||
*h*)
|
|
||||||
firstarg=`echo "$firstarg" | sed s/h//`
|
|
||||||
tar "$firstarg" "$@" && exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
|
||||||
You may want to install GNU tar or Free paxutils, or check the
|
|
||||||
command line arguments."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo 1>&2 "\
|
|
||||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
|
||||||
system. You might have modified some files without having the
|
|
||||||
proper tools for further handling them. Check the \`README' file,
|
|
||||||
it often tells you about the needed prerequirements for installing
|
|
||||||
this package. You may also peek at any GNU archive site, in case
|
|
||||||
some other package would contain this missing \`$1' program."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
Loading…
Add table
Add a link
Reference in a new issue