2003-04-13 13:38:35 +00:00
|
|
|
#!/bin/sh
|
2013-04-14 16:25:35 +00:00
|
|
|
#
|
|
|
|
# gstreamer autogen.sh
|
|
|
|
#
|
2000-01-30 09:03:00 +00:00
|
|
|
# Run this to generate all the initial makefiles, etc.
|
2013-04-14 16:25:35 +00:00
|
|
|
#
|
|
|
|
# This file has been generated from common/autogen.sh.in via common/update-autogen
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2012-01-08 04:00:12 +00:00
|
|
|
test -n "$srcdir" || srcdir=`dirname "$0"`
|
|
|
|
test -n "$srcdir" || srcdir=.
|
|
|
|
|
|
|
|
olddir=`pwd`
|
|
|
|
cd "$srcdir"
|
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
package=gstreamer
|
2013-04-14 16:25:35 +00:00
|
|
|
srcfile=gstreamer.doap
|
2001-12-22 01:58:59 +00:00
|
|
|
|
2009-01-21 03:29:25 +00:00
|
|
|
# Make sure we have common
|
|
|
|
if test ! -f common/gst-autogen.sh;
|
2005-09-05 17:55:10 +00:00
|
|
|
then
|
2009-01-21 03:29:25 +00:00
|
|
|
echo "+ Setting up common submodule"
|
|
|
|
git submodule init
|
2002-02-06 22:28:25 +00:00
|
|
|
fi
|
2009-06-03 08:41:21 +00:00
|
|
|
git submodule update
|
2002-02-06 21:35:37 +00:00
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
# source helper functions
|
|
|
|
if test ! -f common/gst-autogen.sh;
|
|
|
|
then
|
|
|
|
echo There is something wrong with your source tree.
|
|
|
|
echo You are missing common/gst-autogen.sh
|
2001-12-10 17:59:35 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2002-02-09 21:05:12 +00:00
|
|
|
. common/gst-autogen.sh
|
2001-12-10 17:59:35 +00:00
|
|
|
|
2009-01-22 04:35:02 +00:00
|
|
|
# install pre-commit hook for doing clean commits
|
2009-01-30 07:30:28 +00:00
|
|
|
if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
|
2009-01-22 04:35:02 +00:00
|
|
|
then
|
2009-01-30 07:30:28 +00:00
|
|
|
rm -f .git/hooks/pre-commit
|
2015-12-07 14:08:01 +00:00
|
|
|
if ! ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit 2> /dev/null
|
|
|
|
then
|
|
|
|
echo "Failed to create commit hook symlink, copying instead ..."
|
|
|
|
cp common/hooks/pre-commit.hook .git/hooks/pre-commit
|
|
|
|
fi
|
2009-01-22 04:35:02 +00:00
|
|
|
fi
|
|
|
|
|
2012-02-02 18:45:25 +00:00
|
|
|
# GNU gettext automake support doesn't get along with git.
|
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=661128
|
2013-04-14 16:25:35 +00:00
|
|
|
if test -d po ; then
|
|
|
|
touch -t 200001010000 po/gstreamer-1.0.pot
|
|
|
|
fi
|
2009-01-22 04:35:02 +00:00
|
|
|
|
2013-04-14 16:25:35 +00:00
|
|
|
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
|
|
|
|
|
|
|
|
if test "x$package" = "xgstreamer"; then
|
2016-12-16 14:05:46 +00:00
|
|
|
CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-failing-tests --enable-poisoning"
|
2016-02-05 21:01:52 +00:00
|
|
|
elif test "x$package" = "xgst-plugins-bad"; then
|
|
|
|
CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-player-tests"
|
2013-04-14 16:25:35 +00:00
|
|
|
fi
|
2002-05-27 13:37:37 +00:00
|
|
|
|
2016-09-10 10:50:48 +00:00
|
|
|
autogen_options $@
|
2001-12-10 17:59:35 +00:00
|
|
|
|
2009-06-26 12:33:50 +00:00
|
|
|
printf "+ check for build tools"
|
2015-06-07 15:16:06 +00:00
|
|
|
if test -z "$NOCHECK"; then
|
|
|
|
echo
|
|
|
|
|
|
|
|
printf " checking for autoreconf ... "
|
|
|
|
echo
|
|
|
|
which "autoreconf" 2>/dev/null || {
|
|
|
|
echo "not found! Please install the autoconf package."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
printf " checking for pkg-config ... "
|
|
|
|
echo
|
|
|
|
which "pkg-config" 2>/dev/null || {
|
|
|
|
echo "not found! Please install pkg-config."
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
else
|
|
|
|
echo ": skipped version checks"
|
|
|
|
fi
|
2002-02-13 12:18:10 +00:00
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
# if no arguments specified then this will be printed
|
2012-01-01 15:32:27 +00:00
|
|
|
if test -z "$*" && test -z "$NOCONFIGURE"; then
|
2002-02-09 21:05:12 +00:00
|
|
|
echo "+ checking for autogen.sh options"
|
|
|
|
echo " This autogen script will automatically run ./configure as:"
|
|
|
|
echo " ./configure $CONFIGURE_DEF_OPT"
|
|
|
|
echo " To pass any additional options, please specify them on the $0"
|
|
|
|
echo " command line."
|
2000-01-30 09:03:00 +00:00
|
|
|
fi
|
|
|
|
|
2002-02-09 21:05:12 +00:00
|
|
|
toplevel_check $srcfile
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2004-01-13 15:13:11 +00:00
|
|
|
# autopoint
|
2015-06-07 15:16:06 +00:00
|
|
|
if test -d po && grep ^AM_GNU_GETTEXT_VERSION configure.ac >/dev/null ; then
|
2015-04-03 17:57:36 +00:00
|
|
|
tool_run "autopoint" "--force"
|
2004-01-13 11:30:00 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# aclocal
|
2003-05-01 13:17:34 +00:00
|
|
|
if test -f acinclude.m4; then rm acinclude.m4; fi
|
2001-12-14 11:30:50 +00:00
|
|
|
|
2015-04-03 17:57:36 +00:00
|
|
|
autoreconf --force --install || exit 1
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2001-12-22 01:58:59 +00:00
|
|
|
test -n "$NOCONFIGURE" && {
|
2013-04-14 16:25:35 +00:00
|
|
|
echo "+ skipping configure stage for package $package, as requested."
|
|
|
|
echo "+ autogen.sh done."
|
2002-02-09 21:05:12 +00:00
|
|
|
exit 0
|
2001-12-22 01:58:59 +00:00
|
|
|
}
|
|
|
|
|
2012-01-08 04:00:12 +00:00
|
|
|
cd "$olddir"
|
|
|
|
|
2001-12-10 14:05:50 +00:00
|
|
|
echo "+ running configure ... "
|
2013-04-14 16:25:35 +00:00
|
|
|
test ! -z "$CONFIGURE_DEF_OPT" && echo " default flags: $CONFIGURE_DEF_OPT"
|
|
|
|
test ! -z "$CONFIGURE_EXT_OPT" && echo " external flags: $CONFIGURE_EXT_OPT"
|
2001-10-17 10:21:27 +00:00
|
|
|
echo
|
|
|
|
|
2012-01-08 04:00:12 +00:00
|
|
|
echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
|
|
|
|
"$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
|
2002-02-09 21:05:12 +00:00
|
|
|
echo " configure failed"
|
|
|
|
exit 1
|
2001-05-29 16:40:07 +00:00
|
|
|
}
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
echo "Now type 'make' to compile $package."
|