From 8495b0a84946ee6274b6df4479ab8239a7ec528e Mon Sep 17 00:00:00 2001 From: Luo Jinghua Date: Mon, 21 Sep 2009 23:15:19 +0800 Subject: build: update to lastest gstream plugin build system --- .gitmodules | 3 + Makefile.am | 4 +- autogen.sh | 62 +++++-- common | 1 + config.h.in | 42 ++++- configure.ac | 125 ++++++-------- gst-autogen.sh | 308 ----------------------------------- m4/Makefile.am | 2 +- m4/as-compiler-flag.m4 | 25 --- m4/as-version.m4 | 66 -------- mkinstalldirs | 111 ------------- po/ChangeLog | 0 po/LINGUAS | 0 po/Makefile.in.in | 432 +++++++++++++++++++++++++++++++++++++++++++++++++ po/Makevars | 46 ++++++ po/Makevars.template | 41 +++++ po/POTFILES | 1 + po/POTFILES.in | 1 + po/Rules-quot | 47 ++++++ po/boldquot.sed | 10 ++ po/en@boldquot.header | 25 +++ po/en@quot.header | 22 +++ po/insert-header.sin | 23 +++ po/quot.sed | 6 + po/remove-potcdate.sed | 11 ++ po/remove-potcdate.sin | 19 +++ po/stamp-it | 0 po/stamp-po | 1 + src/Makefile.am | 8 +- src/gettext.h | 69 ++++++++ src/gst-i18n-plugin.h | 37 +++++ 31 files changed, 932 insertions(+), 616 deletions(-) create mode 100644 .gitmodules create mode 160000 common delete mode 100644 gst-autogen.sh delete mode 100644 m4/as-compiler-flag.m4 delete mode 100644 m4/as-version.m4 delete mode 100755 mkinstalldirs create mode 100644 po/ChangeLog create mode 100644 po/LINGUAS create mode 100644 po/Makefile.in.in create mode 100644 po/Makevars create mode 100644 po/Makevars.template create mode 100644 po/POTFILES create mode 100644 po/POTFILES.in create mode 100644 po/Rules-quot create mode 100644 po/boldquot.sed create mode 100644 po/en@boldquot.header create mode 100644 po/en@quot.header create mode 100644 po/insert-header.sin create mode 100644 po/quot.sed create mode 100644 po/remove-potcdate.sed create mode 100644 po/remove-potcdate.sin create mode 100644 po/stamp-it create mode 100644 po/stamp-po create mode 100644 src/gettext.h create mode 100644 src/gst-i18n-plugin.h 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/Makefile.am b/Makefile.am index 7203ad8..ade0953 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = m4 src +SUBDIRS = m4 src po -EXTRA_DIST = autogen.sh gst-autogen.sh +EXTRA_DIST = autogen.sh diff --git a/autogen.sh b/autogen.sh index cee19fd..b1d15fa 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,34 +1,47 @@ #!/bin/sh -# you can either set the environment variables AUTOCONF and AUTOMAKE -# to the right versions, or leave them unset and get the RedHat 7.3 defaults +# Run this to generate all the initial makefiles, etc. DIE=0 package=gst-plugins-pmp -srcfile=src/gstscsrc.c +srcfile=src/gstpmpdemux.c -# autogen.sh helper functions (copied from GStreamer's common/ CVS module) -if test ! -f ./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 either missing ./gst-autogen.sh or not - echo running autogen.sh from the top-level source - echo directory. + echo You are missing common/gst-autogen.sh exit 1 fi -. ./gst-autogen.sh +. 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 + -CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-debug' +CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc --enable-plugin-docs' autogen_options $@ echo -n "+ check for build tools" if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi -version_check "autoconf" "$AUTOCONF autoconf autoconf259 autoconf257 autoconf-2.54 autoconf-2.53 autoconf-2.52" \ +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 automake19 automake-1.7 automake-1.6 automake-1.5" \ +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 "autopoint" "autopoint" \ -### "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 5 || 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 version_check "pkg-config" "" \ @@ -51,11 +64,28 @@ if test -z "$*"; then echo " command line." fi -tool_run "$aclocal" "-I m4/ $ACLOCAL_FLAGS" +toplevel_check $srcfile + +# 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 +echo timestamp > stamp-h.in 2> /dev/null + tool_run "$autoconf" -tool_run "$automake" "-a -c" +tool_run "$automake" "-a -c -Wno-portability" # if enable exists, add an -enable option for each of the lines in that file if test -f enable; then diff --git a/common b/common new file mode 160000 index 0000000..709b558 --- /dev/null +++ b/common @@ -0,0 +1 @@ +Subproject commit 709b55890b5fc1354fa867f9280e332a15cc2bf9 diff --git a/config.h.in b/config.h.in index f289af5..f518459 100644 --- a/config.h.in +++ b/config.h.in @@ -1,17 +1,47 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* gettext package name */ +#undef GETTEXT_PACKAGE + +/* GStreamer PPStream license */ +#undef GST_LICENSE + +/* package name in plugins */ +#undef GST_PACKAGE_NAME + +/* package origin */ +#undef GST_PACKAGE_ORIGIN + /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYCURRENT + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#undef HAVE_CFPREFERENCESCOPYAPPVALUE + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK -/* Define to 1 if you have the `gst_type_find_helper_for_extension' function. - */ -#undef HAVE_GST_TYPE_FIND_HELPER_FOR_EXTENSION +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -77,6 +107,9 @@ /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK +/* gettext locale dir */ +#undef LOCALEDIR + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -102,6 +135,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* directory where plugins are located */ +#undef PLUGINDIR + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/configure.ac b/configure.ac index 29ecb32..8b0931c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,24 +1,32 @@ # -*- Autoconf -*- -m4_define([gst_pmp_major], 0) -m4_define([gst_pmp_minor], 0) -m4_define([gst_pmp_micro], 3) -m4_define([gst_pmp_nano], 0) -m4_if(gst_pmp_nano, 0, - [m4_define(gst_pmp_version, gst_pmp_major.gst_pmp_minor.gst_pmp_micro)], - [m4_define(gst_pmp_version, gst_pmp_major.gst_pmp_minor.gst_pmp_micro.gst_pmp_nano)]) -AC_INIT([gst-plugins-pmp], gst_pmp_version) +AC_INIT(GStreamer PPStream Plug-in, 0.0.3, + http://people.freedesktop.org/~jinghua, + gst-plugins-sopcast) + +AG_GST_INIT + +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode +AM_MAINTAINER_MODE +AM_INIT_AUTOMAKE + +dnl define PACKAGE_VERSION_* variables +AS_VERSION + +dnl check if this is a release version +AS_NANO(GST_CVS="no", GST_CVS="yes") dnl AC_INIT([$PACKAGE], [$VERSION]) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) -dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode -dnl AM_MAINTAINER_MODE -AM_INIT_AUTOMAKE +dnl *** autotools stuff **** + +dnl allow for different autotools +AS_AUTOTOOLS_ALTERNATE dnl make aclocal work in maintainer mode -AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4") dnl check for tools AC_PROG_CC @@ -31,11 +39,12 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_LIBTOOL -dnl Add the languages which your application supports to po/LINGUAS -dnl GETTEXT_PACKAGE=gst-plugins-pmp -dnl AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name]) -dnl AC_SUBST(GETTEXT_PACKAGE) -dnl AM_GLIB_GNU_GETTEXT +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-plugins-pmp]) + # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) @@ -55,16 +64,12 @@ AC_FUNC_FORK AC_FUNC_MALLOC AC_CHECK_FUNCS([memset select socket strerror]) -dnl decide on error flags -AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no") +dnl *** check for arguments to configure *** -if test "x$GST_WALL" = "xyes"; then - GST_ERROR="$GST_ERROR -Wall" - - if test "x$GST_PMP_CVS" = "xyes"; then - AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR") - fi -fi +AG_GST_ARG_DEBUG +AG_GST_ARG_WITH_PKG_CONFIG_PATH +AG_GST_ARG_WITH_PACKAGE_NAME +AG_GST_ARG_WITH_PACKAGE_ORIGIN dnl Check for pkgconfig first AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) @@ -79,66 +84,26 @@ dnl And we can also ask for the right version of gstreamer dnl versions of gstreamer and plugins-base GST_MAJORMINOR=0.10 -GST_REQUIRED=0.10.0 +GST_REQ=0.10.0 -PKG_CHECK_MODULES(GST, \ - gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED, - HAVE_GST=yes,HAVE_GST=no) +dnl checks for gstreamer +dnl uninstalled is selected preferentially -- see pkg-config(1) +AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ], yes) +AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ], yes) -dnl Give error and exit if we don't have gstreamer -if test "x$HAVE_GST" = "xno"; then - AC_MSG_ERROR(you need gstreamer development packages installed !) -fi - -dnl append GST_ERROR cflags to GST_CFLAGS -GST_CFLAGS="$GST_CFLAGS $GST_ERROR" - -dnl make GST_CFLAGS and GST_LIBS available -AC_SUBST(GST_CFLAGS) -AC_SUBST(GST_LIBS) - -dnl make GST_MAJORMINOR available in Makefile.am -AC_SUBST(GST_MAJORMINOR) - -dnl If we need them, we can also use the base class libraries -PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED, - HAVE_GST_BASE=yes, HAVE_GST_BASE=no) - -dnl Give a warning if we don't have gstreamer libs -dnl you can turn this into an error if you need them -if test "x$HAVE_GST_BASE" = "xno"; then - AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR)) -fi - -dnl make _CFLAGS and _LIBS available -AC_SUBST(GST_BASE_CFLAGS) -AC_SUBST(GST_BASE_LIBS) - -saved_CFLAGS="$CFLAGS" -saved_LIBS="$LIBS" -CFLAGS="$CFLAGS $GST_BASE_CFLAGS" -LIBS="$LIBS $GST_BASE_LIBS" - -AC_CHECK_FUNCS([gst_type_find_helper_for_extension]) - -CFLAGS=$saved_CFLAGS -LIBS=$saved_LIBS - -dnl set the plugindir where plugins should be installed -if test "x${prefix}" = "x$HOME"; then - pmpdir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins" -else - pmpdir="\$(libdir)/gstreamer-$GST_MAJORMINOR" -fi -AC_SUBST(pmpdir) +AC_MSG_NOTICE(Using GStreamer Core Plugins in $GST_PLUGINS_DIR) +AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR) -dnl set proper LDFLAGS for plugins -GST_PMP_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*' -AC_SUBST(GST_PMP_LDFLAGS) +dnl set license and copyright notice +GST_LICENSE="LGPL" +AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer PPStream license]) +AC_SUBST(GST_LICENSE) -AC_SUBST(PMP_LIBS) +dnl set location of plugin directory +AG_GST_SET_PLUGINDIR AC_OUTPUT(Makefile m4/Makefile + po/Makefile.in src/Makefile) diff --git a/gst-autogen.sh b/gst-autogen.sh deleted file mode 100644 index 7b31212..0000000 --- a/gst-autogen.sh +++ /dev/null @@ -1,308 +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 - ;; - --prefix=*) - CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$optarg" - echo "+ passing --prefix=$optarg to configure" - shift - ;; - --prefix) - shift - echo "DEBUG: $1" - CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$1" - echo "+ passing --prefix=$1 to configure" - 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 " --prefix will be passed on to configure" - echo - echo " --with-autoconf PATH use autoconf in PATH" - echo " --with-automake PATH use automake in PATH" - echo - echo "to pass options to configure, put them as arguments after -- " - 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 - ;; - --disable*|--enable*|--with*) - echo "+ passing option $1 to configure" - CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $1" - shift - ;; - --) shift ; break ;; - *) echo "- ignoring unknown autogen.sh argument $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/m4/Makefile.am b/m4/Makefile.am index 4a44032..1b336ac 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = as-version.m4 as-compiler-flag.m4 +EXTRA_DIST = diff --git a/m4/as-compiler-flag.m4 b/m4/as-compiler-flag.m4 deleted file mode 100644 index 2f0ba19..0000000 --- a/m4/as-compiler-flag.m4 +++ /dev/null @@ -1,25 +0,0 @@ -dnl as-compiler-flag.m4 0.0.1 -dnl autostars m4 macro for detection of compiler flags -dnl -dnl ds@schleef.org - -AC_DEFUN([AS_COMPILER_FLAG], -[ - AC_MSG_CHECKING([to see if compiler understands $1]) - - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - - AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) - CFLAGS="$save_CFLAGS" - - if test "X$flag_ok" = Xyes ; then - $2 - true - else - $3 - true - fi - AC_MSG_RESULT([$flag_ok]) -]) - diff --git a/m4/as-version.m4 b/m4/as-version.m4 deleted file mode 100644 index 0bee437..0000000 --- a/m4/as-version.m4 +++ /dev/null @@ -1,66 +0,0 @@ -dnl as-version.m4 0.1.0 - -dnl autostars m4 macro for versioning - -dnl Thomas Vander Stichele - -dnl $Id: as-version.m4,v 1.2 2004-09-17 22:18:03 leroutier Exp $ - -dnl AS_VERSION(PACKAGE, PREFIX, MAJOR, MINOR, MICRO, NANO, -dnl ACTION-IF-NO-NANO, [ACTION-IF-NANO]) - -dnl example -dnl AS_VERSION(gstreamer, GST_VERSION, 0, 3, 2,) -dnl for a 0.3.2 release version - -dnl this macro -dnl - defines [$PREFIX]_MAJOR, MINOR and MICRO -dnl - if NANO is empty, then we're in release mode, else in cvs/dev mode -dnl - defines [$PREFIX], VERSION, and [$PREFIX]_RELEASE -dnl - executes the relevant action -dnl - AC_SUBST's PACKAGE, VERSION, [$PREFIX] and [$PREFIX]_RELEASE -dnl as well as the little ones -dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents -dnl maintainer mode from running ok -dnl -dnl don't forget to put #undef [$2] and [$2]_RELEASE in acconfig.h -dnl if you use acconfig.h - -AC_DEFUN([AS_VERSION], -[ - PACKAGE=[$1] - [$2]_MAJOR=[$3] - [$2]_MINOR=[$4] - [$2]_MICRO=[$5] - NANO=[$6] - [$2]_NANO=$NANO - if test "x$NANO" = "x" || test "x$NANO" = "x0"; - then - AC_MSG_NOTICE(configuring [$1] for release) - VERSION=[$3].[$4].[$5] - [$2]_RELEASE=1 - dnl execute action - ifelse([$7], , :, [$7]) - else - AC_MSG_NOTICE(configuring [$1] for development with nano $NANO) - VERSION=[$3].[$4].[$5].$NANO - [$2]_RELEASE=0.`date +%Y%m%d.%H%M%S` - dnl execute action - ifelse([$8], , :, [$8]) - fi - - [$2]=$VERSION - AC_DEFINE_UNQUOTED([$2], "$[$2]", [Define the version]) - AC_SUBST([$2]) - AC_DEFINE_UNQUOTED([$2]_RELEASE, "$[$2]_RELEASE", [Define the release version]) - AC_SUBST([$2]_RELEASE) - - AC_SUBST([$2]_MAJOR) - AC_SUBST([$2]_MINOR) - AC_SUBST([$2]_MICRO) - AC_SUBST([$2]_NANO) - AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define the package name]) - AC_SUBST(PACKAGE) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Define the version]) - AC_SUBST(VERSION) -]) diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index d2d5f21..0000000 --- a/mkinstalldirs +++ /dev/null @@ -1,111 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -errstatus=0 -dirmode="" - -usage="\ -Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." - -# process command line arguments -while test $# -gt 0 ; do - case $1 in - -h | --help | --h*) # -h for help - echo "$usage" 1>&2 - exit 0 - ;; - -m) # -m PERM arg - shift - test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } - dirmode=$1 - shift - ;; - --) # stop option processing - shift - break - ;; - -*) # unknown option - echo "$usage" 1>&2 - exit 1 - ;; - *) # first non-opt arg - break - ;; - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in - 0) exit 0 ;; -esac - -case $dirmode in - '') - if mkdir -p -- . 2>/dev/null; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - fi - ;; - *) - if mkdir -m "$dirmode" -p -- . 2>/dev/null; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - fi - ;; -esac - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case $pathcomp in - -*) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# End: -# mkinstalldirs ends here diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e69de29 diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 0000000..1283c32 --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,432 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License but which still want to provide support for the GNU gettext +# functionality. +# Please note that the actual code of GNU gettext is covered by the GNU +# General Public License and is *not* in the public domain. +# +# Origin: gettext-0.17 +GETTEXT_MACRO_VERSION = 0.17 + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + +# thomas: add GETTEXT_PACKAGE substitution as used in Makevars +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ +localedir = @localedir@ +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ + +# We use $(mkdir_p). +# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as +# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, +# @install_sh@ does not start with $(SHELL), so we add it. +# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined +# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake +# versions, $(mkinstalldirs) and $(install_sh) are unused. +mkinstalldirs = $(SHELL) @install_sh@ -d +install_sh = $(SHELL) @install_sh@ +MKDIR_P = @MKDIR_P@ +mkdir_p = @mkdir_p@ + +GMSGFMT_ = @GMSGFMT@ +GMSGFMT_no = @GMSGFMT@ +GMSGFMT_yes = @GMSGFMT_015@ +GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) +MSGFMT_ = @MSGFMT@ +MSGFMT_no = @MSGFMT@ +MSGFMT_yes = @MSGFMT_015@ +MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) +XGETTEXT_ = @XGETTEXT@ +XGETTEXT_no = @XGETTEXT@ +XGETTEXT_yes = @XGETTEXT_015@ +XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) +MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +# Makevars gets inserted here. (Don't remove this line!) + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + +all: check-macro-version all-@USE_NLS@ + +all-yes: stamp-po +all-no: + +# Ensure that the gettext macros and this Makefile.in.in are in sync. +check-macro-version: + @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ + || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ + exit 1; \ + } + +# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no +# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because +# we don't want to bother translators with empty POT files). We assume that +# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. +# In this case, stamp-po is a nop (i.e. a phony target). + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test ! -f $(srcdir)/$(DOMAIN).pot || \ + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @test ! -f $(srcdir)/$(DOMAIN).pot || { \ + echo "touch stamp-po" && \ + echo timestamp > stamp-poT && \ + mv stamp-poT stamp-po; \ + } + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ + package_gnu='GNU '; \ + else \ + package_gnu=''; \ + fi; \ + if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ + else \ + msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ + fi; \ + case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + ;; \ + *) \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --package-name="$${package_gnu}@PACKAGE@" \ + --package-version='@VERSION@' \ + --msgid-bugs-address="$$msgid_bugs_address" \ + ;; \ + esac + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + $(mkdir_p) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + $(mkdir_p) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: stamp-po $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + dists="$$dists $(DOMAIN).pot stamp-po"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir) || exit 1; \ + else \ + cp -p $(srcdir)/$$file $(distdir) || exit 1; \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ + && $(SHELL) ./config.status $(subdir)/$@.in po-directories + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..d743fb3 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,46 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(GETTEXT_PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = http://people.freedesktop.org/~jinghua + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = + +# Avoid line numbers in *.po, but keep them in *.pot. +MSGMERGE = msgmerge --no-location +MSGMERGE_UPDATE = msgmerge --no-location --update +MSGFILTER = msgfilter --no-location diff --git a/po/Makevars.template b/po/Makevars.template new file mode 100644 index 0000000..32692ab --- /dev/null +++ b/po/Makevars.template @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES b/po/POTFILES new file mode 100644 index 0000000..2f312e0 --- /dev/null +++ b/po/POTFILES @@ -0,0 +1 @@ + ../src/gstpmpdemux.c diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..55f4d1e --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +src/gstpmpdemux.c diff --git a/po/Rules-quot b/po/Rules-quot new file mode 100644 index 0000000..9c2a995 --- /dev/null +++ b/po/Rules-quot @@ -0,0 +1,47 @@ +# Special Makefile rules for English message catalogs with quotation marks. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-create: + $(MAKE) en@quot.po-update +en@boldquot.po-create: + $(MAKE) en@boldquot.po-update + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff --git a/po/boldquot.sed b/po/boldquot.sed new file mode 100644 index 0000000..4b937aa --- /dev/null +++ b/po/boldquot.sed @@ -0,0 +1,10 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff --git a/po/en@boldquot.header b/po/en@boldquot.header new file mode 100644 index 0000000..fedb6a0 --- /dev/null +++ b/po/en@boldquot.header @@ -0,0 +1,25 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# diff --git a/po/en@quot.header b/po/en@quot.header new file mode 100644 index 0000000..a9647fc --- /dev/null +++ b/po/en@quot.header @@ -0,0 +1,22 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# diff --git a/po/insert-header.sin b/po/insert-header.sin new file mode 100644 index 0000000..b26de01 --- /dev/null +++ b/po/insert-header.sin @@ -0,0 +1,23 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/quot.sed b/po/quot.sed new file mode 100644 index 0000000..0122c46 --- /dev/null +++ b/po/quot.sed @@ -0,0 +1,6 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff --git a/po/remove-potcdate.sed b/po/remove-potcdate.sed new file mode 100644 index 0000000..edb38d7 --- /dev/null +++ b/po/remove-potcdate.sed @@ -0,0 +1,11 @@ +/^"POT-Creation-Date: .*"$/{ +x +s/P/P/ +ta +g +d +bb +:a +x +:b +} diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin new file mode 100644 index 0000000..2436c49 --- /dev/null +++ b/po/remove-potcdate.sin @@ -0,0 +1,19 @@ +# Sed script that remove the POT-Creation-Date line in the header entry +# from a POT file. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/stamp-it b/po/stamp-it new file mode 100644 index 0000000..e69de29 diff --git a/po/stamp-po b/po/stamp-po new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/po/stamp-po @@ -0,0 +1 @@ +timestamp diff --git a/src/Makefile.am b/src/Makefile.am index a8ec5aa..943a91d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,10 @@ -pmp_LTLIBRARIES = libgstpmpdemux.la +plugin_LTLIBRARIES = libgstpmpdemux.la libgstpmpdemux_la_SOURCES = gstpmpdemux.c -libgstpmpdemux_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(PMP_CFLAGS) -libgstpmpdemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(PMP_LIBS) -libgstpmpdemux_la_LDFLAGS = $(GST_PMP_LDFLAGS) +libgstpmpdemux_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) +libgstpmpdemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) +libgstpmpdemux_la_LDFLAGS = libgstpmpdemux_la_LIBTOOLFLAGS = --tag=disable-static noinst_HEADERS = gstpmpdemux.h diff --git a/src/gettext.h b/src/gettext.h new file mode 100644 index 0000000..8b262f4 --- /dev/null +++ b/src/gettext.h @@ -0,0 +1,69 @@ +/* Convenience header for conditional use of GNU . + Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include + +#else + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of a NOP. We don't include + as well because people using "gettext.h" will not include , + and also including would fail on SunOS 4, whereas + is OK. */ +#if defined(__sun) +# include +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# define gettext(Msgid) ((const char *) (Msgid)) +# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) +# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) +# define textdomain(Domainname) ((const char *) (Domainname)) +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) +# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) + +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +#endif /* _LIBGETTEXT_H */ diff --git a/src/gst-i18n-plugin.h b/src/gst-i18n-plugin.h new file mode 100644 index 0000000..2c37a61 --- /dev/null +++ b/src/gst-i18n-plugin.h @@ -0,0 +1,37 @@ +/* GStreamer + * Copyright (C) 2004 Thomas Vander Stichele + * + * gst-i18n-plugins.h: internationalization macros for the GStreamer plugins + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GST_I18N_PLUGIN_H__ +#define __GST_I18N_PLUGIN_H__ + +#include /* some people need it and some people don't */ +#include "gettext.h" /* included with gettext distribution and copied */ + +#ifndef GETTEXT_PACKAGE +#error You must define GETTEXT_PACKAGE before including this header. +#endif + +/* we want to use shorthand _() for translating and N_() for marking */ +#define _(String) dgettext (GETTEXT_PACKAGE, String) +#define N_(String) gettext_noop (String) +/* FIXME: if we need it, we can add Q_ as well, like in glib */ + +#endif /* __GST_I18N_PLUGIN_H__ */ -- cgit v1.2.3