Update autogen.sh to latest version from common

Fixes build after aclocal_check etc. helpers have been removed.
This commit is contained in:
Tim-Philipp Müller 2015-04-06 10:32:52 +01:00
parent a54d8733b2
commit bff66c0004
2 changed files with 23 additions and 94 deletions

View file

@ -1,66 +0,0 @@
## this one is commonly used with AM_PATH_PYTHONDIR ...
dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
dnl Check if a module containing a given symbol is visible to python.
AC_DEFUN([AM_CHECK_PYMOD],
[AC_REQUIRE([AM_PATH_PYTHON])
py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
ifelse([$2],[], [prog="
import sys
try:
import $1
except ImportError:
sys.exit(1)
except:
sys.exit(0)
sys.exit(0)"], [prog="
import $1
$1.$2"])
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
eval "py_cv_mod_$py_mod_var=yes"
else
eval "py_cv_mod_$py_mod_var=no"
fi
])
py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
if test "x$py_val" != xno; then
AC_MSG_RESULT(yes)
ifelse([$3], [],, [$3
])dnl
else
AC_MSG_RESULT(no)
ifelse([$4], [],, [$4
])dnl
fi
])
dnl a macro to check for ability to create python extensions
dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
dnl function also defines PYTHON_INCLUDES
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
if $PYTHON-config --help 2>/dev/null; then
PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
else
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist:
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
AC_TRY_CPP([#include <Python.h>],dnl
[AC_MSG_RESULT(found)
$1],dnl
[AC_MSG_RESULT(not found)
$2])
CPPFLAGS="$save_CPPFLAGS"
])

View file

@ -1,5 +1,10 @@
#!/bin/sh
#
# gst-rtsp-server autogen.sh
#
# Run this to generate all the initial makefiles, etc.
#
# This file has been generated from common/autogen.sh.in via common/update-autogen
test -n "$srcdir" || srcdir=`dirname "$0"`
@ -9,8 +14,8 @@ olddir=`pwd`
cd "$srcdir"
DIE=0
package=gst-rtsp
srcfile=gst/rtsp-server/rtsp-server.c
package=gst-rtsp-server
srcfile=gst-rtsp-server.doap
# Make sure we have common
if test ! -f common/gst-autogen.sh;
@ -36,30 +41,29 @@ then
ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
fi
# GNU gettext automake support doesn't get along with git.
# https://bugzilla.gnome.org/show_bug.cgi?id=661128
if test -d po ; then
touch -t 200001010000 po/gst-rtsp-server-1.0.pot
fi
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
if test "x$package" = "xgstreamer"; then
CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-docbook --enable-failing-tests --enable-poisoning"
fi
autogen_options $@
printf "+ check for build tools"
if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi
version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
version_check "autoreconf" "autoreconf " \
"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
version_check "automake" "$AUTOMAKE automake automake-1.11" \
"ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
version_check "autopoint" "autopoint" \
"ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
"ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
version_check "pkg-config" "" \
"http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
die_check $DIE
aclocal_check || DIE=1
autoheader_check || DIE=1
die_check $DIE
# if no arguments specified then this will be printed
if test -z "$*" && test -z "$NOCONFIGURE"; then
echo "+ checking for autogen.sh options"
@ -72,23 +76,14 @@ fi
toplevel_check $srcfile
# autopoint
#if test -d po ; then
# tool_run "$autopoint" "--force"
#fi
if test -d po ; then
tool_run "autopoint" "--force"
fi
# aclocal
# if test -f acinclude.m4; then rm acinclude.m4; fi
if test -f acinclude.m4; then rm acinclude.m4; fi
tool_run "$libtoolize" "--copy --force"
tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
tool_run "$autoheader"
# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
echo timestamp > stamp-h.in 2> /dev/null
tool_run "$autoconf"
debug "automake: $automake"
tool_run "$automake" "--add-missing --copy"
autoreconf --force --install || exit 1
test -n "$NOCONFIGURE" && {
echo "+ skipping configure stage for package $package, as requested."