Blame autogen.sh

Packit Service 963350
#!/bin/sh
Packit Service 963350
#
Packit Service 963350
# gstreamer autogen.sh
Packit Service 963350
#
Packit Service 963350
# Run this to generate all the initial makefiles, etc.
Packit Service 963350
#
Packit Service 963350
# This file has been generated from common/autogen.sh.in via common/update-autogen
Packit Service 963350
Packit Service 963350
Packit Service 963350
test -n "$srcdir" || srcdir=`dirname "$0"`
Packit Service 963350
test -n "$srcdir" || srcdir=.
Packit Service 963350
Packit Service 963350
olddir=`pwd`
Packit Service 963350
cd "$srcdir"
Packit Service 963350
Packit Service 963350
package=gstreamer
Packit Service 963350
srcfile=gstreamer.doap
Packit Service 963350
Packit Service 963350
# Make sure we have common
Packit Service 963350
if test ! -f common/gst-autogen.sh;
Packit Service 963350
then
Packit Service 963350
  echo "+ Setting up common submodule"
Packit Service 963350
  git submodule init
Packit Service 963350
fi
Packit Service 963350
git submodule update
Packit Service 963350
Packit Service 963350
# source helper functions
Packit Service 963350
if test ! -f common/gst-autogen.sh;
Packit Service 963350
then
Packit Service 963350
  echo There is something wrong with your source tree.
Packit Service 963350
  echo You are missing common/gst-autogen.sh
Packit Service 963350
  exit 1
Packit Service 963350
fi
Packit Service 963350
. common/gst-autogen.sh
Packit Service 963350
Packit Service 963350
# install pre-commit hook for doing clean commits
Packit Service 963350
if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
Packit Service 963350
then
Packit Service 963350
    rm -f .git/hooks/pre-commit
Packit Service 963350
    if ! ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit 2> /dev/null
Packit Service 963350
    then
Packit Service 963350
        echo "Failed to create commit hook symlink, copying instead ..."
Packit Service 963350
        cp common/hooks/pre-commit.hook .git/hooks/pre-commit
Packit Service 963350
    fi
Packit Service 963350
fi
Packit Service 963350
Packit Service 963350
# GNU gettext automake support doesn't get along with git.
Packit Service 963350
# https://bugzilla.gnome.org/show_bug.cgi?id=661128
Packit Service 963350
if test -d po ; then
Packit Service 963350
  touch -t 200001010000 po/gstreamer-1.0.pot
Packit Service 963350
fi
Packit Service 963350
Packit Service 963350
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
Packit Service 963350
Packit Service 963350
if test "x$package" = "xgstreamer"; then
Packit Service 963350
  CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-failing-tests --enable-poisoning"
Packit Service 963350
elif test "x$package" = "xgst-plugins-bad"; then
Packit Service 963350
  CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-player-tests"
Packit Service 963350
fi
Packit Service 963350
Packit Service 963350
autogen_options $@
Packit Service 963350
Packit Service 963350
printf "+ check for build tools"
Packit Service 963350
if test -z "$NOCHECK"; then
Packit Service 963350
  echo
Packit Service 963350
Packit Service 963350
  printf "  checking for autoreconf ... "
Packit Service 963350
  echo
Packit Service 963350
  which "autoreconf" 2>/dev/null || {
Packit Service 963350
    echo "not found! Please install the autoconf package."
Packit Service 963350
    exit 1
Packit Service 963350
  }
Packit Service 963350
Packit Service 963350
  printf "  checking for pkg-config ... "
Packit Service 963350
  echo
Packit Service 963350
  which "pkg-config" 2>/dev/null || {
Packit Service 963350
    echo "not found! Please install pkg-config."
Packit Service 963350
    exit 1
Packit Service 963350
  }
Packit Service 963350
else
Packit Service 963350
  echo ": skipped version checks"
Packit Service 963350
fi
Packit Service 963350
Packit Service 963350
# if no arguments specified then this will be printed
Packit Service 963350
if test -z "$*" && test -z "$NOCONFIGURE"; then
Packit Service 963350
  echo "+ checking for autogen.sh options"
Packit Service 963350
  echo "  This autogen script will automatically run ./configure as:"
Packit Service 963350
  echo "  ./configure $CONFIGURE_DEF_OPT"
Packit Service 963350
  echo "  To pass any additional options, please specify them on the $0"
Packit Service 963350
  echo "  command line."
Packit Service 963350
fi
Packit Service 963350
Packit Service 963350
toplevel_check $srcfile
Packit Service 963350
Packit Service 963350
# autopoint
Packit Service 963350
if test -d po && grep ^AM_GNU_GETTEXT_VERSION configure.ac >/dev/null ; then
Packit Service 963350
  tool_run "autopoint" "--force"
Packit Service 963350
fi
Packit Service 963350
Packit Service 963350
# aclocal
Packit Service 963350
if test -f acinclude.m4; then rm acinclude.m4; fi
Packit Service 963350
Packit Service 963350
autoreconf --force --install || exit 1
Packit Service 963350
Packit Service 963350
test -n "$NOCONFIGURE" && {
Packit Service 963350
  echo "+ skipping configure stage for package $package, as requested."
Packit Service 963350
  echo "+ autogen.sh done."
Packit Service 963350
  exit 0
Packit Service 963350
}
Packit Service 963350
Packit Service 963350
cd "$olddir"
Packit Service 963350
Packit Service 963350
echo "+ running configure ... "
Packit Service 963350
test ! -z "$CONFIGURE_DEF_OPT" && echo "  default flags:  $CONFIGURE_DEF_OPT"
Packit Service 963350
test ! -z "$CONFIGURE_EXT_OPT" && echo "  external flags: $CONFIGURE_EXT_OPT"
Packit Service 963350
echo
Packit Service 963350
Packit Service 963350
echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
Packit Service 963350
"$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
Packit Service 963350
        echo "  configure failed"
Packit Service 963350
        exit 1
Packit Service 963350
}
Packit Service 963350
Packit Service 963350
echo "Now type 'make' to compile $package."