diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-05 16:49:47 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-05 16:49:47 +0800 |
commit | e95d87720888a4d2d542ea538e9c5a2df83204c3 (patch) | |
tree | 4693a24127afcc2d0ff12cbd08ebe344ce37bd59 /configure.ac | |
parent | 2aad3329f5e067885a48c28c961a7485fa6d718e (diff) |
divorced with gst-plugins-pps
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 208 |
1 files changed, 10 insertions, 198 deletions
diff --git a/configure.ac b/configure.ac index cfd54b9..9689a2b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,13 +1,14 @@ # -*- Autoconf -*- -m4_define([gst_pps_major], 0) -m4_define([gst_pps_minor], 0) -m4_define([gst_pps_micro], 15) -m4_define([gst_pps_nano], 15) -AC_INIT([gst-plugins-pps], gst_pps_major.gst_pps_minor.gst_pps_micro.gst_pps_nano) +m4_define([totem_pps_major], 0) +m4_define([totem_pps_minor], 0) +m4_define([totem_pps_micro], 15) +m4_define([totem_pps_nano], 15) +AC_INIT([totem-pps], totem_pps_major.totem_pps_minor.totem_pps_micro.totem_pps_nano) 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 @@ -25,215 +26,26 @@ AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET -AC_PROG_RANLIB AC_PROG_LIBTOOL dnl Add the languages which your application supports to po/LINGUAS -GETTEXT_PACKAGE=ppstream +GETTEXT_PACKAGE=totem-pps AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name]) AC_SUBST(GETTEXT_PACKAGE) AM_GLIB_GNU_GETTEXT IT_PROG_INTLTOOL([0.40.0]) -# 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]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_INT64_T -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T -AC_TYPE_UINT16_T -AC_TYPE_UINT32_T -AC_TYPE_UINT64_T -AC_TYPE_UINT8_T - -# Checks for library functions. -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") - -if test "x$GST_WALL" = "xyes"; then - GST_ERROR="$GST_ERROR -Wall" - - if test "x$GST_PPS_CVS" = "xyes"; then - AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR") - fi -fi - -dnl Check for pkgconfig first -AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) - -dnl Give error and exit if we don't have pkgconfig -if test "x$HAVE_PKGCONFIG" = "xno"; then - AC_MSG_ERROR(you need to have pkgconfig installed !) -fi - -dnl Now we're ready to ask for gstreamer libs and cflags -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 - -PKG_CHECK_MODULES(GST, \ - gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED, - HAVE_GST=yes,HAVE_GST=no) - -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 - ppsdir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins" -else - ppsdir="\$(libdir)/gstreamer-$GST_MAJORMINOR" -fi -AC_SUBST(ppsdir) - -dnl set proper LDFLAGS for plugins -GST_PPS_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*' -AC_SUBST(GST_PPS_LDFLAGS) - -AC_ARG_ENABLE(wrapper, - AS_HELP_STRING([--enable-wrapper], - [Use pps wrapper]), - [use_wrapper=$enableval], - [use_wrapper=auto]) - -savedLDFLAGS=$LDFLAGS -savedLIB=$LIBS - -AC_LANG(C++) - -PPS_DEP_LIBS='-lppsbase -lppssg -lppsvodres -lppsfds -lppsvodnet' -LIBS="-lppsapi $PPS_DEP_LIBS $LIBS" -PPS_LIBS= -PPS32_LIBS= -WRAPPER_LDFLAGS="-pthread -lppsapi $PPS_DEP_LIBS" -WRAPPER_CFLAGS="-pthread" -WRAPPER_PRELOAD_LDFLAGS="-avoid-version -ldl" -WRAPPER_PRELOAD_CFLAGS= -AC_MSG_CHECKING([whether pps libraris is available]) -AC_LINK_IFELSE(AC_LANG_CALL([], ppsvod_create), - [AC_MSG_RESULT(yes) - HAVE_PPS="yes"], - [AC_MSG_RESULT(no) - HAVE_PPS="no"]) -if test "x$HAVE_PPS" = "xyes"; then - PPS_LIBS="-lppsapi $PPS_DEP_LIBS" -# AC_DEFINE_UNQUOTED(HAVE_LIBPPS) -else - AC_MSG_CHECKING([whether pps 32bit libraris is available]) - saved32LDFLAGS=$LDFLAGS - LDFLAGS="-m32 $LDFLAGS" - AC_LINK_IFELSE(AC_LANG_CALL([], ppsvod_destroy), - [ HAVE_PPS32="yes" - AC_MSG_RESULT(yes)], - [ HAVE_PPS32="no" - AC_MSG_RESULT(no)]) - if test "x$HAVE_PPS32" = "xyes"; then - PPS32_LIBS="-lppsapi $PPS_DEP_LIBS" - else - AC_MSG_ERROR(['couldn't find pps libraries.]) - fi - LDFLAGS=$saved32LDFLAGS - WRAPPER_CFLAGS="-m32 $WRAPPER_CFLAGS" - WRAPPER_LDFLAGS="-m32 $WRAPPER_LDFLAGS" - WRAPPER_PRELOAD_CFLAGS="-m32 $WRAPPER_PRELOAD_CFLAGS" - WRAPPER_PRELOAD_LDFLAGS="-m32 $WRAPPER_PRELOAD_LDFLAGS" - use_wrapper=yes -# AC_DEFINE_UNQUOTED(HAVE_LIBPPS32) -fi -LDFLAGS=$savedLDFLAGS -LIBS=$savedLIB - -AC_LANG(C) - -AC_SUBST(PPS_LIBS) -AC_SUBST(PPS32_LIBS) -AC_SUBST(WRAPPER_LDFLAGS) -AC_SUBST(WRAPPER_CFLAGS) -AC_SUBST(WRAPPER_PRELOAD_LDFLAGS) -AC_SUBST(WRAPPER_PRELOAD_CFLAGS) - -AM_CONDITIONAL(USE_PPSWRAPPER, [test "x$use_wrapper" != "xno"]) - dnl ================================================================ dnl Totem plugins dnl ================================================================ PLUGINDIR='${libdir}/totem/plugins' AC_SUBST(PLUGINDIR) -AC_MSG_CHECKING([whether Totem plugin support is requested]) -AC_ARG_ENABLE([totem], - AS_HELP_STRING([--enable-totem],[Enable totem support]), - [enable_totem=$enableval have_totem=$enableval], - [enable_totem=autodetect have_totem=yes]) -AC_MSG_RESULT([$enable_totem]) - -if test "x$have_totem" != "xno"; then - AM_PATH_PYTHON([2.3],[],[have_totem=no]) - if test "x$PYTHON" = "x:"; then - have_totem=no - fi -fi +AM_PATH_PYTHON([2.3],[], + AC_MSG_ERROR([python2.3 and above is required to install totem-pps])) AC_OUTPUT(Makefile m4/Makefile - src/Makefile po/Makefile.in - wrapper/Makefile - wrapper/ppswrapper-run-server totem/Makefile - totem/plugin/Makefile) - -if test x$use_wrapper = xyes;then - AC_MSG_NOTICE([** Using pps wrapper]) -else - AC_MSG_NOTICE([** Not using pps wrapper, ppssrc may can only be used by root]) -fi -if test x$have_totem = xyes;then - AC_MSG_NOTICE([** Totem plugin enabled]) -else - AC_MSG_NOTICE([ Totem plugin disabled]) -fi + totem/plugin/Makefile)
\ No newline at end of file |