1#!/bin/sh 2# 3# gst-plugins-bad autogen.sh 4# 5# Run this to generate all the initial makefiles, etc. 6# 7# This file has been generated from common/autogen.sh.in via common/update-autogen 8 9 10test -n "$srcdir" || srcdir=`dirname "$0"` 11test -n "$srcdir" || srcdir=. 12 13olddir=`pwd` 14cd "$srcdir" 15 16package=gst-plugins-bad 17srcfile=gst-plugins-bad.doap 18 19# Make sure we have common 20if test ! -f common/gst-autogen.sh; 21then 22 echo "+ Setting up common submodule" 23 git submodule init 24fi 25git submodule update 26 27# source helper functions 28if test ! -f common/gst-autogen.sh; 29then 30 echo There is something wrong with your source tree. 31 echo You are missing common/gst-autogen.sh 32 exit 1 33fi 34. common/gst-autogen.sh 35 36# install pre-commit hook for doing clean commits 37if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \); 38then 39 rm -f .git/hooks/pre-commit 40 if ! ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit 2> /dev/null 41 then 42 echo "Failed to create commit hook symlink, copying instead ..." 43 cp common/hooks/pre-commit.hook .git/hooks/pre-commit 44 fi 45fi 46 47# GNU gettext automake support doesn't get along with git. 48# https://bugzilla.gnome.org/show_bug.cgi?id=661128 49if test -d po ; then 50 touch -t 200001010000 po/gst-plugins-bad-1.0.pot 51fi 52 53CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc' 54 55if test "x$package" = "xgstreamer"; then 56 CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-failing-tests --enable-poisoning" 57elif test "x$package" = "xgst-plugins-bad"; then 58 CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-player-tests" 59fi 60 61autogen_options $@ 62 63printf "+ check for build tools" 64if test -z "$NOCHECK"; then 65 echo 66 67 printf " checking for autoreconf ... " 68 echo 69 which "autoreconf" 2>/dev/null || { 70 echo "not found! Please install the autoconf package." 71 exit 1 72 } 73 74 printf " checking for pkg-config ... " 75 echo 76 which "pkg-config" 2>/dev/null || { 77 echo "not found! Please install pkg-config." 78 exit 1 79 } 80else 81 echo ": skipped version checks" 82fi 83 84# if no arguments specified then this will be printed 85if test -z "$*" && test -z "$NOCONFIGURE"; then 86 echo "+ checking for autogen.sh options" 87 echo " This autogen script will automatically run ./configure as:" 88 echo " ./configure $CONFIGURE_DEF_OPT" 89 echo " To pass any additional options, please specify them on the $0" 90 echo " command line." 91fi 92 93toplevel_check $srcfile 94 95# autopoint 96if test -d po && grep ^AM_GNU_GETTEXT_VERSION configure.ac >/dev/null ; then 97 tool_run "autopoint" "--force" 98fi 99 100# aclocal 101if test -f acinclude.m4; then rm acinclude.m4; fi 102 103autoreconf --force --install || exit 1 104 105test -n "$NOCONFIGURE" && { 106 echo "+ skipping configure stage for package $package, as requested." 107 echo "+ autogen.sh done." 108 exit 0 109} 110 111cd "$olddir" 112 113echo "+ running configure ... " 114test ! -z "$CONFIGURE_DEF_OPT" && echo " default flags: $CONFIGURE_DEF_OPT" 115test ! -z "$CONFIGURE_EXT_OPT" && echo " external flags: $CONFIGURE_EXT_OPT" 116echo 117 118echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT 119"$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || { 120 echo " configure failed" 121 exit 1 122} 123 124echo "Now type 'make' to compile $package." 125