2003-05-09 08:09:38 +00:00
|
|
|
#!/bin/sh
|
2001-12-17 18:37:01 +00:00
|
|
|
# Run this to generate all the initial makefiles, etc.
|
|
|
|
|
|
|
|
DIE=0
|
2005-08-31 17:57:35 +00:00
|
|
|
package=gst-plugins-ugly
|
|
|
|
srcfile=ext/mad/gstmad.c
|
2001-12-17 18:37:01 +00:00
|
|
|
|
2005-09-06 14:05:40 +00:00
|
|
|
# a quick cvs co to ease the transition
|
|
|
|
if test ! -d common;
|
|
|
|
then
|
2002-02-06 18:46:39 +00:00
|
|
|
echo "+ getting common/ from cvs"
|
2005-09-06 14:05:40 +00:00
|
|
|
if test -e CVS/Tag
|
|
|
|
then
|
|
|
|
TAG="-r `tail -c +2 CVS/Tag`"
|
|
|
|
fi
|
|
|
|
cvs co $TAG common
|
2002-02-06 18:46:39 +00:00
|
|
|
fi
|
|
|
|
|
2002-02-06 18:18:16 +00:00
|
|
|
# source helper functions
|
2003-05-09 08:09:38 +00:00
|
|
|
if test ! -f common/gst-autogen.sh;
|
2002-02-06 18:18:16 +00:00
|
|
|
then
|
|
|
|
echo There is something wrong with your source tree.
|
|
|
|
echo You are missing common/gst-autogen.sh
|
2001-12-17 18:37:01 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2002-02-06 18:18:16 +00:00
|
|
|
. common/gst-autogen.sh
|
2001-12-17 18:37:01 +00:00
|
|
|
|
2005-09-04 19:28:29 +00:00
|
|
|
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
|
2002-05-27 14:01:51 +00:00
|
|
|
|
2002-02-06 18:18:16 +00:00
|
|
|
autogen_options $@
|
2001-12-17 18:37:01 +00:00
|
|
|
|
2002-02-06 18:18:16 +00:00
|
|
|
echo -n "+ check for build tools"
|
2003-05-21 15:16:51 +00:00
|
|
|
if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
|
2002-11-02 05:37:37 +00:00
|
|
|
version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
|
2002-09-30 07:20:35 +00:00
|
|
|
"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
|
2006-06-29 14:31:55 +00:00
|
|
|
version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.7 automake-1.6 automake-1.5" \
|
2006-06-11 17:08:11 +00:00
|
|
|
"ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1
|
2006-07-28 15:11:42 +00:00
|
|
|
version_check "autopoint" "autopoint" \
|
|
|
|
"ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 5 || DIE=1
|
2006-05-08 11:57:26 +00:00
|
|
|
version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
|
2004-02-29 08:35:55 +00:00
|
|
|
"ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
|
2002-09-30 07:20:35 +00:00
|
|
|
version_check "pkg-config" "" \
|
|
|
|
"http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
|
2001-12-17 18:37:01 +00:00
|
|
|
|
2002-05-18 22:45:56 +00:00
|
|
|
die_check $DIE
|
|
|
|
|
2003-04-13 20:13:58 +00:00
|
|
|
autoconf_2_52d_check || DIE=1
|
2002-04-18 21:57:05 +00:00
|
|
|
aclocal_check || DIE=1
|
2002-05-27 14:01:51 +00:00
|
|
|
autoheader_check || DIE=1
|
2001-12-17 18:37:01 +00:00
|
|
|
|
2002-05-18 22:45:56 +00:00
|
|
|
die_check $DIE
|
|
|
|
|
2002-02-06 18:18:16 +00:00
|
|
|
# if no arguments specified then this will be printed
|
2001-12-17 18:37:01 +00:00
|
|
|
if test -z "$*"; then
|
2002-02-07 14:30:20 +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."
|
2001-12-17 18:37:01 +00:00
|
|
|
fi
|
|
|
|
|
2002-02-06 18:18:16 +00:00
|
|
|
toplevel_check $srcfile
|
|
|
|
|
2004-01-19 15:45:55 +00:00
|
|
|
# autopoint
|
|
|
|
# older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
|
2006-07-28 15:11:42 +00:00
|
|
|
if test -x mkinstalldirs; then rm mkinstalldirs; fi
|
2004-01-19 15:45:55 +00:00
|
|
|
# first remove patch if necessary, then run autopoint, then reapply
|
2006-07-28 15:11:42 +00:00
|
|
|
if test -f po/Makefile.in.in;
|
|
|
|
then
|
|
|
|
patch -p0 -R < common/gettext.patch
|
|
|
|
fi
|
|
|
|
tool_run "$autopoint --force"
|
|
|
|
patch -p0 < common/gettext.patch
|
2004-01-19 15:45:55 +00:00
|
|
|
|
2004-05-17 00:38:59 +00:00
|
|
|
tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
|
2003-08-17 23:35:38 +00:00
|
|
|
tool_run "$libtoolize" "--copy --force"
|
2002-05-27 14:01:51 +00:00
|
|
|
tool_run "$autoheader"
|
2002-02-06 18:18:16 +00:00
|
|
|
|
2001-12-26 23:14:44 +00:00
|
|
|
# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
|
|
|
|
echo timestamp > stamp-h.in 2> /dev/null
|
2001-12-17 18:37:01 +00:00
|
|
|
|
2002-03-02 12:03:23 +00:00
|
|
|
tool_run "$autoconf"
|
2008-01-10 12:28:19 +00:00
|
|
|
tool_run "$automake" "-a -c -Wno-portability"
|
2001-12-17 18:37:01 +00:00
|
|
|
|
2001-12-20 23:13:50 +00:00
|
|
|
# if enable exists, add an -enable option for each of the lines in that file
|
|
|
|
if test -f enable; then
|
|
|
|
for a in `cat enable`; do
|
2003-05-12 15:08:49 +00:00
|
|
|
CONFIGURE_FILE_OPT="--enable-$a"
|
2001-12-20 23:13:50 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
# if disable exists, add an -disable option for each of the lines in that file
|
|
|
|
if test -f disable; then
|
|
|
|
for a in `cat disable`; do
|
2003-05-12 15:08:49 +00:00
|
|
|
CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
|
2001-12-20 23:13:50 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2001-12-22 01:59:48 +00:00
|
|
|
test -n "$NOCONFIGURE" && {
|
2002-02-07 14:30:20 +00:00
|
|
|
echo "+ skipping configure stage for package $package, as requested."
|
|
|
|
echo "+ autogen.sh done."
|
|
|
|
exit 0
|
2001-12-22 01:59:48 +00:00
|
|
|
}
|
2001-12-20 23:13:50 +00:00
|
|
|
|
2001-12-17 18:37:01 +00:00
|
|
|
echo "+ running configure ... "
|
2002-02-06 18:18:16 +00:00
|
|
|
test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
|
|
|
|
test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
|
2003-05-12 15:08:49 +00:00
|
|
|
test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
|
2001-12-17 18:37:01 +00:00
|
|
|
echo
|
|
|
|
|
2003-05-12 15:08:49 +00:00
|
|
|
./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
|
2002-02-06 18:18:16 +00:00
|
|
|
echo " configure failed"
|
|
|
|
exit 1
|
2001-12-17 18:37:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
echo "Now type 'make' to compile $package."
|