3 # gst-plugins-bad autogen.sh
5 # Run this to generate all the initial makefiles, etc.
7 # This file has been generated from common/autogen.sh.in via common/update-autogen
10 test -n "$srcdir" || srcdir=`dirname "$0"`
11 test -n "$srcdir" || srcdir=.
17 package=gst-plugins-bad
18 srcfile=gst-plugins-bad.doap
20 # Make sure we have common
21 if test ! -f common/gst-autogen.sh;
23 echo "+ Setting up common submodule"
28 # source helper functions
29 if test ! -f common/gst-autogen.sh;
31 echo There is something wrong with your source tree.
32 echo You are missing common/gst-autogen.sh
35 . common/gst-autogen.sh
37 # install pre-commit hook for doing clean commits
38 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
40 rm -f .git/hooks/pre-commit
41 ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
44 # GNU gettext automake support doesn't get along with git.
45 # https://bugzilla.gnome.org/show_bug.cgi?id=661128
47 touch -t 200001010000 po/gst-plugins-bad-1.0.pot
50 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
52 if test "x$package" = "xgstreamer"; then
53 CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-docbook --enable-failing-tests --enable-poisoning"
58 printf "+ check for build tools"
59 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi
60 version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 " \
61 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
62 version_check "automake" "$AUTOMAKE automake automake-1.11" \
63 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
64 version_check "autopoint" "autopoint" \
65 "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
66 version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
67 "ftp://ftp.gnu.org/pub/gnu/libtool/" 2 2 6 || DIE=1
68 version_check "pkg-config" "" \
69 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
73 aclocal_check || DIE=1
74 autoheader_check || DIE=1
78 # if no arguments specified then this will be printed
79 if test -z "$*" && test -z "$NOCONFIGURE"; then
80 echo "+ checking for autogen.sh options"
81 echo " This autogen script will automatically run ./configure as:"
82 echo " ./configure $CONFIGURE_DEF_OPT"
83 echo " To pass any additional options, please specify them on the $0"
87 toplevel_check $srcfile
90 # first remove patch if necessary, then run autopoint, then reapply
91 if test -f po/Makefile.in.in;
93 patch -p0 -R --forward < common/gettext.patch
95 tool_run "$autopoint" "--force" "patch -p0 < common/gettext.patch"
96 patch -p0 < common/gettext.patch
99 if test -f acinclude.m4; then rm acinclude.m4; fi
101 tool_run "$libtoolize" "--copy --force"
102 tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
103 tool_run "$autoheader"
105 # touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode
106 echo timestamp > stamp-h.in 2> /dev/null
109 debug "automake: $automake"
110 tool_run "$automake" "--add-missing --copy"
112 test -n "$NOCONFIGURE" && {
113 echo "+ skipping configure stage for package $package, as requested."
114 echo "+ autogen.sh done."
120 echo "+ running configure ... "
121 test ! -z "$CONFIGURE_DEF_OPT" && echo " default flags: $CONFIGURE_DEF_OPT"
122 test ! -z "$CONFIGURE_EXT_OPT" && echo " external flags: $CONFIGURE_EXT_OPT"
125 echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
126 "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
127 echo " configure failed"
131 echo "Now type 'make' to compile $package."