summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-12-11 23:59:54 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-12-12 15:48:37 +0000
commit088c7c07a2525fe83f2c7ffd77b79f4e9db19fb9 (patch)
tree2d7d59ab12f1e844c6347e65f30c83b942826a0e /configure.ac
parente897373a0a0218f84d42b51bda85f15e84f7e7d7 (diff)
tag: add some utility functions for language codes and tags
Add some utility functions for language tags and ISO-639 codes. These are useful for both GUIs and elements. The iso-codes package is used for language name translations if available. API: gst_tag_get_language_codes() API: gst_tag_get_language_name() API: gst_tag_get_language_code() API: gst_tag_get_language_code_iso_639_1() API: gst_tag_get_language_code_iso_639_2B() API: gst_tag_get_language_code_iso_639_2T()
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac53
1 files changed, 53 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index bc3e66bf..e461d866 100644
--- a/configure.ac
+++ b/configure.ac
@@ -348,6 +348,56 @@ if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
AG_GST_DISABLE_PLUGIN(tcp)
fi
+dnl iso-codes is optional, used by libgsttag
+AC_ARG_ENABLE(iso-codes,
+AC_HELP_STRING([--enable-iso-codes],[use iso-codes if installed]),
+[case "${enableval}" in
+ yes) enable_iso_codes=yes ;;
+ no) enable_iso_codes=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-iso-codes) ;;
+esac
+],
+[enable_iso_codes=yes]) dnl Default value
+
+AC_MSG_CHECKING([whether to use iso-codes if they are available])
+if test "x$enable_iso_codes" = "xyes"; then
+ AC_MSG_RESULT([yes])
+ have_iso_codes=no
+ AC_MSG_CHECKING([whether iso-codes are available on this system])
+ if $PKG_CONFIG iso-codes; then
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([whether iso-codes has iso-639 domain])
+ if $PKG_CONFIG --variable=domains iso-codes | $GREP -q 639 ; then
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([for iso-codes prefix])
+ ISO_CODES_PREFIX=`$PKG_CONFIG --variable=prefix iso-codes`
+ if test -d "$ISO_CODES_PREFIX"; then
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([ISO_CODES_PREFIX])
+ AC_MSG_RESULT([$ISO_CODES_PREFIX])
+ ISO_639_DOMAIN="iso_639"
+ AC_MSG_CHECKING([ISO_639_DOMAIN])
+ AC_MSG_RESULT([$ISO_639_DOMAIN])
+ have_iso_codes=yes
+ AC_DEFINE([HAVE_ISO_CODES], [1], [make use of iso-codes for ISO-639])
+ AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX], ["$ISO_CODES_PREFIX"], [prefix])
+ ISO_CODES_VERSION=`$PKG_CONFIG --modversion iso-codes`
+ AC_DEFINE_UNQUOTED([ISO_CODES_VERSION], ["$ISO_CODES_VERSION"], [ ])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ AM_CONDITIONAL(USE_ISO_CODES, test "x$have_iso_codes" = "xyes")
+else
+ AC_MSG_RESULT([no (disabled via --disable-iso-codes)])
+ AM_CONDITIONAL(USE_ISO_CODES, false)
+fi
+
dnl *** sys plug-ins ***
echo
@@ -847,6 +897,7 @@ sed \
-e 's/.* HAVE_CPU_I386$/#define HAVE_CPU_I386 1/' \
-e 's/.* HAVE_FGETPOS$/#define HAVE_FGETPOS 1/' \
-e 's/.* HAVE_FSETPOS$/#define HAVE_FSETPOS 1/' \
+ -e 's/.* HAVE_ISO_CODES$/#undef HAVE_ISO_CODES/' \
-e 's/.* HAVE_LIBXML2$/#define HAVE_LIBXML2 1/' \
-e 's/.* HAVE_PROCESS_H$/#define HAVE_PROCESS_H 1/' \
-e 's/.* HAVE_STDLIB_H$/#define HAVE_STDLIB_H 1/' \
@@ -856,6 +907,8 @@ sed \
-e 's/.* HAVE_WIN32$/#define HAVE_WIN32 1/' \
-e 's/.* HAVE_WINSOCK2_H$/#define HAVE_WINSOCK2_H 1/' \
-e 's/.* HOST_CPU$/#define HOST_CPU "i686"/' \
+ -e 's/.* ISO_CODES_PREFIX$/#undef ISO_CODES_PREFIX/' \
+ -e 's/.* ISO_CODES_VERSION$/#undef ISO_CODES_VERSION/' \
-e 's/.* LIBDIR$/#ifdef _DEBUG\n# define LIBDIR PREFIX "\\\\debug\\\\lib"\n#else\n# define LIBDIR PREFIX "\\\\lib"\n#endif/' \
-e 's/.* LOCALEDIR$/#define LOCALEDIR PREFIX "\\\\share\\\\locale"/' \
-e "s/.* PACKAGE$/#define PACKAGE \"$PACKAGE\"/" \