gst-plugins-mythtv/configure.ac
author morphbr
Wed Apr 04 21:18:43 2007 +0100 (2007-04-04)
branchtrunk
changeset 499 9900800a8dd6
parent 285 0923cd303a9a
child 503 b0e8a532e882
permissions -rw-r--r--
[svn r504] Gmyth-Streamer: mencoder stdout bug fix (Chenca's bug)
     1 #                                               -*- Autoconf -*-
     2 # Process this file with autoconf to produce a configure script.
     3 
     4 AC_PREREQ(2.50)
     5 
     6 AC_INIT([mythtvsrc],[0.1])
     7 
     8 dnl AC_CONFIG_SRCDIR([src])
     9 AC_CONFIG_HEADER(config.h)
    10 
    11 dnl when going to/from release please set the nano (fourth number) right !
    12 dnl releases only do Wall, SVN and prerelease does Werror too
    13 AS_VERSION(mythtvsrc, MYTHTVSRC, 0, 1, 0, 3, MYTHTVSRC_SVN="no", MYTHTVSRC_SVN="yes")
    14 
    15 MYTHTVSRC_MAJORMINOR=$MYTHTVSRC_MAJOR_VERSION.$MYTHTVSRC_MINOR_VERSION
    16 
    17 AC_SUBST(MYTHTVSRC_MAJORMINOR)
    18 
    19 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    20 AM_MAINTAINER_MODE
    21 dnl make aclocal work in maintainer mode
    22 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    23 
    24 # Checks for programs.
    25 # check for tools
    26 # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    27 CFLAGS="$CFLAGS -Wall"
    28 AC_PROG_CC
    29 AC_PROG_LIBTOOL
    30 # Checks for libraries.
    31 
    32 # Checks for header files.
    33 AC_HEADER_STDC
    34 AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
    35 
    36 # Checks for typedefs, structures, and compiler characteristics.
    37 AC_C_CONST
    38 AC_TYPE_PID_T
    39 AC_STRUCT_TM
    40 
    41 # Checks for library functions.
    42 AC_FUNC_FORK
    43 AC_PROG_GCC_TRADITIONAL
    44 AC_FUNC_MALLOC
    45 AC_FUNC_MKTIME
    46 AC_FUNC_VPRINTF
    47 AC_CHECK_FUNCS([memset socket stime strstr strtoul])
    48 
    49 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    50 
    51 # Checks required packages
    52 
    53 dnl Test if --disable-debug given
    54 AC_ARG_ENABLE(debug,
    55 	[AC_HELP_STRING([--disable-debug], [disable debugging mode])],
    56 	enable_debug="$enableval",
    57 	enable_debug=yes)
    58 
    59 if test "x$enable_debug" = "xyes" ; then
    60       CFLAGS="$CFLAGS -g"
    61 else
    62       AC_DEFINE( NDEBUG, 1, [disable debug messages] )
    63       CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
    64 fi          
    65 
    66 AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
    67 
    68 # Check for pkgconfig
    69 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    70 # Give error and exit if we don't have pkgconfig
    71 if test "x$HAVE_PKGCONFIG" = "xno"; then
    72   AC_MSG_ERROR(you need to have pkgconfig installed !)
    73 fi
    74 
    75 # Check for Glib2.0
    76 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
    77 
    78 # Give error and exit if we don't have glib
    79 if test "x$HAVE_GLIB" = "xno"; then
    80   AC_MSG_ERROR(you need glib-2.0 installed)
    81 fi
    82 
    83 # make GLIB_CFLAGS and GLIB_LIBS available
    84 AC_SUBST(GLIB_CFLAGS)
    85 AC_SUBST(GLIB_LIBS)
    86 
    87 # Check for GObject2.0
    88 PKG_CHECK_MODULES(GOBJECT,
    89   gobject-2.0,
    90   HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
    91 
    92 # Give error and exit if we don't have gobject
    93 if test "x$HAVE_GOBJECT" = "xno"; then
    94   AC_MSG_ERROR(you need gobject-2.0 installed)
    95 fi
    96 
    97 # make GOBJECT_CFLAGS and GOBJECT_LIBS available
    98 AC_SUBST(GOBJECT_CFLAGS)
    99 AC_SUBST(GOBJECT_LIBS)
   100 
   101 dnl ========== Check for Hildon Libraries
   102 PKG_CHECK_MODULES(HILDON,
   103   hildon-lgpl libosso hildon-status-bar-lib libhildonmenu hildon-base-lib hildon-control-panel hildon-libs,
   104   HAVE_HILDON=yes, HAVE_HILDON=no)
   105 
   106 if test "x$HAVE_HILDON" = "xyes"; then
   107   AC_DEFINE(MAEMO_PLATFORM, 1, [build with hildon libs])
   108   HILDON_CFLAGS="$HILDON_CFLAGS -DMAEMO_PLATFORM=1"
   109 else
   110   AC_MSG_RESULT(no)
   111 fi
   112 
   113 AM_CONDITIONAL(MAEMO_PLATFORM, test "x$HAVE_HILDON" = "xyes")
   114 
   115 dnl make HILDON_CFLAGS and HILDON_LIBS available
   116 AC_SUBST(HILDON_CFLAGS)
   117 AC_SUBST(HILDON_LIBS)
   118 
   119 dnl *** MythTV ***
   120 PKG_CHECK_MODULES(GMYTH,
   121   gmyth-0.1,
   122   HAVE_GMYTH=yes, HAVE_GMYTH=no)
   123 
   124 # Give error and exit if we don't have gobject
   125 if test "x$HAVE_GMYTH" = "xno"; then
   126   AC_MSG_ERROR(you need gmyth-0.1 must to be installed)
   127 fi
   128 
   129 # make GMYTH_CFLAGS and GMYTH_LIBS available
   130 AC_SUBST(GMYTH_CFLAGS)
   131 AC_SUBST(GMYTH_LIBS)
   132 
   133 # GStreamer version required
   134 GST_REQUIRED=0.10
   135 GST_MAJORMINOR=0.10
   136 
   137 GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir`
   138 AC_SUBST(GST_PLUGINS_DIR)
   139 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GST_PLUGINS_DIR)
   140 
   141 dnl this really should only contain flags, not libs - they get added before
   142 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
   143 GST_PLUGIN_LDFLAGS="-module -avoid-version $GST_PLUGINS_DIR"
   144 AC_SUBST(GST_PLUGIN_LDFLAGS)
   145 
   146 # check for gstreamer development files
   147 PKG_CHECK_MODULES(GST, \
   148   gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
   149   HAVE_GST=yes, HAVE_GST=no)
   150 
   151 # Give error and exit if we don't have gstreamer
   152 if test "x$HAVE_GST" = "xno"; then
   153   AC_MSG_ERROR(you need gstreamer development packages installed !)
   154 fi
   155 
   156 # make GST_CFLAGS and GST_LIBS available
   157 AC_SUBST(GST_CFLAGS)
   158 AC_SUBST(GST_LIBS)
   159 
   160 # check for gstreamer-base plugins (xoverlay interface)
   161 GST_BASE_REQUIRED=0.10
   162 GST_BASE_MAJORMINOR=0.10
   163 PKG_CHECK_MODULES(GST_BASE, \
   164   gstreamer-base-$GST_BASE_MAJORMINOR >= $GST_BASE_REQUIRED,
   165   HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
   166 
   167 # Give error and exit if we don't have gstreamer base libraries
   168 if test "x$HAVE_GST_BASE" = "xno"; then
   169   AC_MSG_ERROR(you need gstreamer base development packages installed !)
   170 fi
   171 
   172 # make GST_BASE_CFLAGS and GST_BASE_LIBS available
   173 AC_SUBST(GST_BASE_CFLAGS)
   174 AC_SUBST(GST_BASE_LIBS)
   175 
   176 # make GST_MAJORMINOR available in Makefile.am
   177 AC_SUBST(GST_MAJORMINOR)
   178 
   179 AC_DEFINE(GST_LICENSE, "LGPL", [License for Distribution])
   180 
   181 AC_DEFINE(GST_PACKAGE_NAME, "GStreamer", [Gstremar package name])
   182 
   183 AC_DEFINE(GST_PACKAGE_ORIGIN, "http://gstreamer.net/", [Origin of this package] )
   184 
   185 AC_CONFIG_FILES([
   186 Makefile
   187 src/Makefile
   188 ])
   189 
   190 AC_OUTPUT