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