summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2010-11-02 16:02:01 -0500
committerRob Clark <rob@ti.com>2010-11-30 09:46:22 -0600
commit2f3d871b366979885424fa214d8a06ec62941a78 (patch)
treeff52a5869eff7f9cb34394f6b9c2b8d209126b57
parentfd710ad66dbc3fc07c24485c75e64302a44cbc6d (diff)
use common submodule
Align autogen.sh with other gst trees, including use of the commit-hook. Also, shave no longer seemed to be working AM_SILENT_RULES (as used by other gst trees) does. Signed-off-by: Rob Clark <rob@ti.com>
-rw-r--r--.gitignore3
-rw-r--r--.gitmodules3
-rwxr-xr-xautogen.sh60
-rw-r--r--build-aux/gst-autogen.sh294
m---------common0
-rw-r--r--configure.ac17
-rw-r--r--shave-libtool.in69
-rw-r--r--shave.in79
8 files changed, 68 insertions, 457 deletions
diff --git a/.gitignore b/.gitignore
index dc154e8..7f93004 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,9 @@
.libs
Makefile.in
+ABOUT-NLS
+po
+
INSTALL
Makefile
aclocal.m4
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..a6b1eda
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "common"]
+ path = common
+ url = git://anongit.freedesktop.org/gstreamer/common
diff --git a/autogen.sh b/autogen.sh
index 2931a08..e795484 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,9 +1,33 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
+DIE=0
package=gst-openmax
+srcfile=omx/gstomx.c
-. build-aux/gst-autogen.sh
+# Make sure we have common
+if test ! -f common/gst-autogen.sh;
+then
+ echo "+ Setting up common submodule"
+ git submodule init
+fi
+git submodule update
+
+# source helper functions
+if test ! -f common/gst-autogen.sh;
+then
+ echo There is something wrong with your source tree.
+ echo You are missing common/gst-autogen.sh
+ exit 1
+fi
+. common/gst-autogen.sh
+
+# install pre-commit hook for doing clean commits
+if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
+then
+ rm -f .git/hooks/pre-commit
+ ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit
+fi
touch ChangeLog
@@ -11,20 +35,21 @@ CONFIGURE_DEF_OPT='--enable-maintainer-mode'
autogen_options $@
-echo -n "+ check for build tools"
+printf "+ check for build tools"
if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
-version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \
-"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
-version_check "automake" "$AUTOMAKE automake automake-1.9 automake-1.7 automake-1.6 automake-1.5" \
-"ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1
+version_check "autoconf" "$AUTOCONF autoconf autoconf270 autoconf269 autoconf268 autoconf267 autoconf266 autoconf265 autoconf264 autoconf263 autoconf262 autoconf261 autoconf260" \
+ "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 60 || DIE=1
+version_check "automake" "$AUTOMAKE automake automake-1.11 automake-1.10" \
+ "ftp://ftp.gnu.org/pub/gnu/automake/" 1 10 || DIE=1
+version_check "autopoint" "autopoint" \
+ "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 17 || DIE=1
version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
-"ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
+ "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
version_check "pkg-config" "" \
-"http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
+ "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
die_check $DIE
-autoconf_2_52d_check || DIE=1
aclocal_check || DIE=1
autoheader_check || DIE=1
@@ -41,8 +66,19 @@ fi
toplevel_check $srcfile
-tool_run "$aclocal" "-I m4 $ACLOCAL_FLAGS"
+# autopoint
+# older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
+if test -x mkinstalldirs; then rm mkinstalldirs; fi
+# first remove patch if necessary, then run autopoint, then reapply
+if test -f po/Makefile.in.in;
+then
+ patch -p0 -R < common/gettext.patch
+fi
+tool_run "$autopoint --force"
+patch -p0 < common/gettext.patch
+
tool_run "$libtoolize" "--copy --force"
+tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
tool_run "$autoheader"
# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
@@ -78,8 +114,8 @@ test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CO
echo
./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
- echo " configure failed"
- exit 1
+ echo " configure failed"
+ exit 1
}
echo "Now type 'make' to compile $package."
diff --git a/build-aux/gst-autogen.sh b/build-aux/gst-autogen.sh
deleted file mode 100644
index c22108f..0000000
--- a/build-aux/gst-autogen.sh
+++ /dev/null
@@ -1,294 +0,0 @@
-# a silly hack that generates autoregen.sh but it's handy
-# Remove the old autoregen.sh first to create a new file,
-# as the current one may be being read by the shell executing
-# this script.
-if [ -f "autoregen.sh" ]; then
- rm autoregen.sh
-fi
-echo "#!/bin/sh" > autoregen.sh
-echo "./autogen.sh $@ \$@" >> autoregen.sh
-chmod +x autoregen.sh
-
-# helper functions for autogen.sh
-
-debug ()
-# print out a debug message if DEBUG is a defined variable
-{
- if test ! -z "$DEBUG"
- then
- echo "DEBUG: $1"
- fi
-}
-
-version_check ()
-# check the version of a package
-# first argument : package name (executable)
-# second argument : optional path where to look for it instead
-# third argument : source download url
-# rest of arguments : major, minor, micro version
-# all consecutive ones : suggestions for binaries to use
-# (if not specified in second argument)
-{
- PACKAGE=$1
- PKG_PATH=$2
- URL=$3
- MAJOR=$4
- MINOR=$5
- MICRO=$6
-
- # for backwards compatibility, we let PKG_PATH=PACKAGE when PKG_PATH null
- if test -z "$PKG_PATH"; then PKG_PATH=$PACKAGE; fi
- debug "major $MAJOR minor $MINOR micro $MICRO"
- VERSION=$MAJOR
- if test ! -z "$MINOR"; then VERSION=$VERSION.$MINOR; else MINOR=0; fi
- if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi
-
- debug "major $MAJOR minor $MINOR micro $MICRO"
-
- for SUGGESTION in $PKG_PATH; do
- COMMAND="$SUGGESTION"
-
- # don't check if asked not to
- test -z "$NOCHECK" && {
- echo -n " checking for $COMMAND >= $VERSION ... "
- } || {
- # we set a var with the same name as the package, but stripped of
- # unwanted chars
- VAR=`echo $PACKAGE | sed 's/-//g'`
- debug "setting $VAR"
- eval $VAR="$COMMAND"
- return 0
- }
-
- debug "checking version with $COMMAND"
- ($COMMAND --version) < /dev/null > /dev/null 2>&1 ||
- {
- echo "not found."
- continue
- }
- # strip everything that's not a digit, then use cut to get the first field
- pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1`
- debug "pkg_version $pkg_version"
- # remove any non-digit characters from the version numbers to permit numeric
- # comparison
- pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
- pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
- pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
- test -z "$pkg_major" && pkg_major=0
- test -z "$pkg_minor" && pkg_minor=0
- test -z "$pkg_micro" && pkg_micro=0
- debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
-
- #start checking the version
- debug "version check"
-
- # reset check
- WRONG=
-
- if [ ! "$pkg_major" -gt "$MAJOR" ]; then
- debug "major: $pkg_major <= $MAJOR"
- if [ "$pkg_major" -lt "$MAJOR" ]; then
- debug "major: $pkg_major < $MAJOR"
- WRONG=1
- elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
- debug "minor: $pkg_minor <= $MINOR"
- if [ "$pkg_minor" -lt "$MINOR" ]; then
- debug "minor: $pkg_minor < $MINOR"
- WRONG=1
- elif [ "$pkg_micro" -lt "$MICRO" ]; then
- debug "micro: $pkg_micro < $MICRO"
- WRONG=1
- fi
- fi
- fi
-
- if test ! -z "$WRONG"; then
- echo "found $pkg_version, not ok !"
- continue
- else
- echo "found $pkg_version, ok."
- # we set a var with the same name as the package, but stripped of
- # unwanted chars
- VAR=`echo $PACKAGE | sed 's/-//g'`
- debug "setting $VAR"
- eval $VAR="$COMMAND"
- return 0
- fi
- done
-
- echo "not found !"
- echo "You must have $PACKAGE installed to compile $package."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at $URL"
- return 1;
-}
-
-aclocal_check ()
-{
- # normally aclocal is part of automake
- # so we expect it to be in the same place as automake
- # so if a different automake is supplied, we need to adapt as well
- # so how's about replacing automake with aclocal in the set var,
- # and saving that in $aclocal ?
- # note, this will fail if the actual automake isn't called automake*
- # or if part of the path before it contains it
- if [ -z "$automake" ]; then
- echo "Error: no automake variable set !"
- return 1
- else
- aclocal=`echo $automake | sed s/automake/aclocal/`
- debug "aclocal: $aclocal"
- if [ "$aclocal" != "aclocal" ];
- then
- CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal"
- fi
- if [ ! -x `which $aclocal` ]; then
- echo "Error: cannot execute $aclocal !"
- return 1
- fi
- fi
-}
-
-autoheader_check ()
-{
- # same here - autoheader is part of autoconf
- # use the same voodoo
- if [ -z "$autoconf" ]; then
- echo "Error: no autoconf variable set !"
- return 1
- else
- autoheader=`echo $autoconf | sed s/autoconf/autoheader/`
- debug "autoheader: $autoheader"
- if [ "$autoheader" != "autoheader" ];
- then
- CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader"
- fi
- if [ ! -x `which $autoheader` ]; then
- echo "Error: cannot execute $autoheader !"
- return 1
- fi
- fi
-
-}
-
-autoconf_2_52d_check ()
-{
- # autoconf 2.52d has a weird issue involving a yes:no error
- # so don't allow it's use
- test -z "$NOCHECK" && {
- ac_version=`$autoconf --version|head -n 1|sed 's/^[a-zA-Z\.\ ()]*//;s/ .*$//'`
- if test "$ac_version" = "2.52d"; then
- echo "autoconf 2.52d has an issue with our current build."
- echo "We don't know who's to blame however. So until we do, get a"
- echo "regular version. RPM's of a working version are on the gstreamer site."
- exit 1
- fi
- }
- return 0
-}
-
-die_check ()
-{
- # call with $DIE
- # if set to 1, we need to print something helpful then die
- DIE=$1
- if test "x$DIE" = "x1";
- then
- echo
- echo "- Please get the right tools before proceeding."
- echo "- Alternatively, if you're sure we're wrong, run with --nocheck."
- exit 1
- fi
-}
-
-autogen_options ()
-{
- if test "x$1" = "x"; then
- return 0
- fi
-
- while test "x$1" != "x" ; do
- optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- case "$1" in
- --noconfigure)
- NOCONFIGURE=defined
- AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure"
- echo "+ configure run disabled"
- shift
- ;;
- --nocheck)
- AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --nocheck"
- NOCHECK=defined
- echo "+ autotools version check disabled"
- shift
- ;;
- --debug)
- DEBUG=defined
- AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --debug"
- echo "+ debug output enabled"
- shift
- ;;
- -h|--help)
- echo "autogen.sh (autogen options) -- (configure options)"
- echo "autogen.sh help options: "
- echo " --noconfigure don't run the configure script"
- echo " --nocheck don't do version checks"
- echo " --debug debug the autogen process"
- echo
- echo " --with-autoconf PATH use autoconf in PATH"
- echo " --with-automake PATH use automake in PATH"
- echo
- echo "Any argument either not in the above list or after a '--' will be "
- echo "passed to ./configure."
- exit 1
- ;;
- --with-automake=*)
- AUTOMAKE=$optarg
- echo "+ using alternate automake in $optarg"
- CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-automake=$AUTOMAKE"
- shift
- ;;
- --with-autoconf=*)
- AUTOCONF=$optarg
- echo "+ using alternate autoconf in $optarg"
- CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoconf=$AUTOCONF"
- shift
- ;;
- --) shift ; break ;;
- *)
- echo "+ passing argument $1 to configure"
- CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $1"
- shift
- ;;
- esac
- done
-
- for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done
- if test ! -z "$CONFIGURE_EXT_OPT"
- then
- echo "+ options passed to configure: $CONFIGURE_EXT_OPT"
- fi
-}
-
-toplevel_check ()
-{
- srcfile=$1
- test -f $srcfile || {
- echo "You must run this script in the top-level $package directory"
- exit 1
- }
-}
-
-tool_run ()
-{
- tool=$1
- options=$2
- run_if_fail=$3
- echo "+ running $tool $options..."
- $tool $options || {
- echo
- echo $tool failed
- eval $run_if_fail
- exit 1
- }
-}
diff --git a/common b/common
new file mode 160000
+Subproject 011bcc8a0fc7f798ee874a7ba899123fb2470e2
diff --git a/configure.ac b/configure.ac
index b6a1316..85ff1e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,14 @@ GST_REQUIRED=0.10.0
dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
AM_MAINTAINER_MODE
+dnl sets host_* variables
+AC_CANONICAL_HOST
+
+dnl use pretty build output with automake >= 1.11
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
+ [AM_DEFAULT_VERBOSITY=1
+ AC_SUBST(AM_DEFAULT_VERBOSITY)])
+
dnl check for tools
AC_PROG_CC
AM_PROG_CC_C_O
@@ -31,6 +39,12 @@ AG_GST_INIT
dnl define an ERROR_CFLAGS Makefile variable
AG_GST_SET_ERROR_CFLAGS($GST_CVS)
+dnl set up gettext
+dnl the version check needs to stay here because autopoint greps for it
+AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT([external])
+AG_GST_GETTEXT([gst-openmax-$GST_MAJORMINOR])
+
dnl add GStreamer arguments
AG_GST_ARG_DEBUG
AG_GST_ARG_PROFILING
@@ -101,9 +115,6 @@ dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
AC_SUBST(GST_PLUGIN_LDFLAGS)
-SHAVE_INIT
-AC_CONFIG_FILES([shave shave-libtool])
-
AC_CONFIG_FILES([Makefile \
omx/Makefile \
util/Makefile \
diff --git a/shave-libtool.in b/shave-libtool.in
deleted file mode 100644
index 1f3a720..0000000
--- a/shave-libtool.in
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-# we need sed
-SED=@SED@
-if test -z "$SED" ; then
-SED=sed
-fi
-
-lt_unmangle ()
-{
- last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
-}
-
-# the real libtool to use
-LIBTOOL="$1"
-shift
-
-# if 1, don't print anything, the underlaying wrapper will do it
-pass_though=0
-
-# scan the arguments, keep the right ones for libtool, and discover the mode
-preserved_args=
-while test "$#" -gt 0; do
- opt="$1"
- shift
-
- case $opt in
- --mode=*)
- mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
- preserved_args="$preserved_args $opt"
- ;;
- -o)
- lt_output="$1"
- preserved_args="$preserved_args $opt"
- ;;
- *)
- preserved_args="$preserved_args $opt"
- ;;
- esac
-done
-
-case "$mode" in
-compile)
- # shave will be called and print the actual CC/CXX/LINK line
- preserved_args="$preserved_args --shave-mode=$mode"
- pass_though=1
- ;;
-link)
- preserved_args="$preserved_args --shave-mode=$mode"
- Q=" LINK "
- ;;
-*)
- # let's u
- # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
- ;;
-esac
-
-lt_unmangle "$lt_output"
-output=$last_result
-
-if test -z $V; then
- if test $pass_though -eq 0; then
- echo "$Q$output"
- fi
- $LIBTOOL --silent $preserved_args
-else
- echo $LIBTOOL $preserved_args
- $LIBTOOL $preserved_args
-fi
diff --git a/shave.in b/shave.in
deleted file mode 100644
index 5c16f27..0000000
--- a/shave.in
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-# we need sed
-SED=@SED@
-if test -z "$SED" ; then
-SED=sed
-fi
-
-lt_unmangle ()
-{
- last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
-}
-
-# the tool to wrap (cc, cxx, ar, ranlib, ..)
-tool="$1"
-shift
-
-# the reel tool (to call)
-REEL_TOOL="$1"
-shift
-
-pass_through=0
-preserved_args=
-while test "$#" -gt 0; do
- opt="$1"
- shift
-
- case $opt in
- --shave-mode=*)
- mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
- ;;
- -o)
- lt_output="$1"
- preserved_args="$preserved_args $opt"
- ;;
- *)
- preserved_args="$preserved_args $opt"
- ;;
- esac
-done
-
-# mode=link is handled in the libtool wrapper
-case "$mode,$tool" in
-link,*)
- pass_through=1
- ;;
-*,cxx)
- Q=" CXX "
- ;;
-*,cc)
- Q=" CC "
- ;;
-*,fc)
- Q=" FC "
- ;;
-*,f77)
- Q=" F77 "
- ;;
-*,objc)
- Q=" OBJC "
- ;;
-*,*)
- # should not happen
- Q=" CC "
- ;;
-esac
-
-lt_unmangle "$lt_output"
-output=$last_result
-
-if test -z $V; then
- if test $pass_through -eq 0; then
- echo "$Q$output"
- fi
- $REEL_TOOL $preserved_args
-else
- echo $REEL_TOOL $preserved_args
- $REEL_TOOL $preserved_args
-fi