2 # you can either set the environment variables AUTOCONF and AUTOMAKE
3 # to the right versions, or leave them unset and get the RedHat 7.3 defaults
9 # autogen.sh helper functions (copied from GStreamer's common/ CVS module)
10 if test ! -f .
/gst-autogen.sh
;
12 echo There is something wrong with your
source tree.
13 echo You are either missing .
/gst-autogen.sh or not
14 echo running autogen.sh from the top-level
source
20 CONFIGURE_DEF_OPT
='--enable-maintainer-mode --enable-debug'
24 echo -n "+ check for build tools"
25 if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
26 version_check
"autoconf" "$AUTOCONF autoconf autoconf259 autoconf257 autoconf-2.54 autoconf-2.53 autoconf-2.52" \
27 "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE
=1
28 version_check
"automake" "$AUTOMAKE automake automake-1.9 automake19 automake-1.7 automake-1.6 automake-1.5" \
29 "ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE
=1
30 ###version_check "autopoint" "autopoint" \
31 ### "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 5 || DIE=1
32 version_check
"libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
33 "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE
=1
34 version_check
"pkg-config" "" \
35 "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE
=1
39 autoconf_2_52d_check || DIE
=1
40 aclocal_check || DIE
=1
41 autoheader_check || DIE
=1
45 # if no arguments specified then this will be printed
47 echo "+ checking for autogen.sh options"
48 echo " This autogen script will automatically run ./configure as:"
49 echo " ./configure $CONFIGURE_DEF_OPT"
50 echo " To pass any additional options, please specify them on the $0"
54 tool_run
"$aclocal" "-I m4/ $ACLOCAL_FLAGS"
55 tool_run
"$libtoolize" "--copy --force"
56 tool_run
"$autoheader"
58 tool_run
"$automake" "-a -c --foreign"
60 # if enable exists, add an -enable option for each of the lines in that file
61 if test -f enable; then
62 for a
in `cat enable`; do
63 CONFIGURE_FILE_OPT
="--enable-$a"
67 # if disable exists, add an -disable option for each of the lines in that file
68 if test -f disable
; then
69 for a
in `cat disable`; do
70 CONFIGURE_FILE_OPT
="$CONFIGURE_FILE_OPT --disable-$a"
74 test -n "$NOCONFIGURE" && {
75 echo "+ skipping configure stage for package $package, as requested."
76 echo "+ autogen.sh done."
80 echo "+ running configure ... "
81 test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
82 test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
83 test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
86 .
/configure
$CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT ||
{
87 echo " configure failed"
91 echo "Now type 'make' to compile $package."