leo_sobral@2: # -*- Autoconf -*- leo_sobral@2: # Process this file with autoconf to produce a configure script. leo_sobral@2: leo_sobral@2: AC_PREREQ(2.50) leo_sobral@2: leo_sobral@2: AC_INIT([mythtvsrc],[0.1]) leo_sobral@2: abnerf@13: dnl AC_CONFIG_SRCDIR([src]) leo_sobral@2: AC_CONFIG_HEADER(config.h) leo_sobral@2: leo_sobral@2: dnl when going to/from release please set the nano (fourth number) right ! leo_sobral@2: dnl releases only do Wall, SVN and prerelease does Werror too leo_sobral@2: AS_VERSION(mythtvsrc, MYTHTVSRC, 0, 1, 0, 3, MYTHTVSRC_SVN="no", MYTHTVSRC_SVN="yes") leo_sobral@2: leo_sobral@2: MYTHTVSRC_MAJORMINOR=$MYTHTVSRC_MAJOR_VERSION.$MYTHTVSRC_MINOR_VERSION leo_sobral@2: leo_sobral@2: AC_SUBST(MYTHTVSRC_MAJORMINOR) leo_sobral@2: leo_sobral@2: dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode leo_sobral@2: AM_MAINTAINER_MODE leo_sobral@2: dnl make aclocal work in maintainer mode leo_sobral@2: AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") leo_sobral@2: leo_sobral@2: # Checks for programs. leo_sobral@2: # check for tools leo_sobral@2: # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g leo_sobral@2: CFLAGS="$CFLAGS -Wall" leo_sobral@2: AC_PROG_CC leo_sobral@2: AC_PROG_LIBTOOL leo_sobral@2: # Checks for libraries. leo_sobral@2: leo_sobral@2: # Checks for header files. leo_sobral@2: AC_HEADER_STDC leo_sobral@2: AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h]) leo_sobral@2: leo_sobral@2: # Checks for typedefs, structures, and compiler characteristics. leo_sobral@2: AC_C_CONST leo_sobral@2: AC_TYPE_PID_T leo_sobral@2: AC_STRUCT_TM leo_sobral@2: leo_sobral@2: # Checks for library functions. leo_sobral@2: AC_FUNC_FORK leo_sobral@2: AC_PROG_GCC_TRADITIONAL leo_sobral@2: AC_FUNC_MALLOC leo_sobral@2: AC_FUNC_MKTIME leo_sobral@2: AC_FUNC_VPRINTF leo_sobral@2: AC_CHECK_FUNCS([memset socket stime strstr strtoul]) leo_sobral@2: leo_sobral@2: AM_INIT_AUTOMAKE($PACKAGE, $VERSION) leo_sobral@2: leo_sobral@2: # Checks required packages leo_sobral@2: leo_sobral@2: dnl Test if --disable-debug given leo_sobral@2: AC_ARG_ENABLE(debug, leo_sobral@2: [AC_HELP_STRING([--disable-debug], [disable debugging mode])], leo_sobral@2: enable_debug="$enableval", leo_sobral@2: enable_debug=yes) leo_sobral@2: leo_sobral@2: if test "x$enable_debug" = "xyes" ; then leo_sobral@2: CFLAGS="$CFLAGS -g" leo_sobral@2: else leo_sobral@2: AC_DEFINE( NDEBUG, 1, [disable debug messages] ) leo_sobral@2: CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG" leo_sobral@2: fi leo_sobral@2: leo_sobral@2: AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" ) leo_sobral@2: leo_sobral@2: # Check for pkgconfig leo_sobral@2: AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) leo_sobral@2: # Give error and exit if we don't have pkgconfig leo_sobral@2: if test "x$HAVE_PKGCONFIG" = "xno"; then leo_sobral@2: AC_MSG_ERROR(you need to have pkgconfig installed !) leo_sobral@2: fi leo_sobral@2: leo_sobral@2: # Check for Glib2.0 leo_sobral@2: PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no) leo_sobral@2: leo_sobral@2: # Give error and exit if we don't have glib leo_sobral@2: if test "x$HAVE_GLIB" = "xno"; then leo_sobral@2: AC_MSG_ERROR(you need glib-2.0 installed) leo_sobral@2: fi leo_sobral@2: leo_sobral@2: # make GLIB_CFLAGS and GLIB_LIBS available leo_sobral@2: AC_SUBST(GLIB_CFLAGS) leo_sobral@2: AC_SUBST(GLIB_LIBS) leo_sobral@2: leo_sobral@2: # Check for GObject2.0 leo_sobral@2: PKG_CHECK_MODULES(GOBJECT, leo_sobral@2: gobject-2.0, leo_sobral@2: HAVE_GOBJECT=yes, HAVE_GOBJECT=no) leo_sobral@2: leo_sobral@2: # Give error and exit if we don't have gobject leo_sobral@2: if test "x$HAVE_GOBJECT" = "xno"; then leo_sobral@2: AC_MSG_ERROR(you need gobject-2.0 installed) leo_sobral@2: fi leo_sobral@2: leo_sobral@2: # make GOBJECT_CFLAGS and GOBJECT_LIBS available leo_sobral@2: AC_SUBST(GOBJECT_CFLAGS) leo_sobral@2: AC_SUBST(GOBJECT_LIBS) leo_sobral@2: leo_sobral@2: dnl ========== Check for Hildon Libraries leo_sobral@2: PKG_CHECK_MODULES(HILDON, leo_sobral@2: hildon-lgpl libosso hildon-status-bar-lib libhildonmenu hildon-base-lib hildon-control-panel hildon-libs, leo_sobral@2: HAVE_HILDON=yes, HAVE_HILDON=no) leo_sobral@2: leo_sobral@2: if test "x$HAVE_HILDON" = "xyes"; then leo_sobral@2: AC_DEFINE(MAEMO_PLATFORM, 1, [build with hildon libs]) leo_sobral@2: HILDON_CFLAGS="$HILDON_CFLAGS -DMAEMO_PLATFORM=1" leo_sobral@2: else leo_sobral@2: AC_MSG_RESULT(no) leo_sobral@2: fi leo_sobral@2: leo_sobral@2: AM_CONDITIONAL(MAEMO_PLATFORM, test "x$HAVE_HILDON" = "xyes") leo_sobral@2: leo_sobral@2: dnl make HILDON_CFLAGS and HILDON_LIBS available leo_sobral@2: AC_SUBST(HILDON_CFLAGS) leo_sobral@2: AC_SUBST(HILDON_LIBS) leo_sobral@2: leo_sobral@2: dnl *** MythTV *** leo_sobral@2: PKG_CHECK_MODULES(GMYTH, leo_sobral@2: gmyth-0.1, leo_sobral@2: HAVE_GMYTH=yes, HAVE_GMYTH=no) leo_sobral@2: leo_sobral@2: # Give error and exit if we don't have gobject leo_sobral@2: if test "x$HAVE_GMYTH" = "xno"; then leo_sobral@2: AC_MSG_ERROR(you need gmyth-0.1 must to be installed) leo_sobral@2: fi leo_sobral@2: leo_sobral@2: # make GMYTH_CFLAGS and GMYTH_LIBS available leo_sobral@2: AC_SUBST(GMYTH_CFLAGS) leo_sobral@2: AC_SUBST(GMYTH_LIBS) leo_sobral@2: rosfran@8: # GStreamer version required leo_sobral@2: GST_REQUIRED=0.10 leo_sobral@2: GST_MAJORMINOR=0.10 rosfran@8: rosfran@8: GST_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable pluginsdir` rosfran@8: AC_SUBST(GST_PLUGINS_DIR) rosfran@8: AC_MSG_NOTICE(Using GStreamer Base Plugins in $GST_PLUGINS_DIR) rosfran@8: rosfran@8: dnl this really should only contain flags, not libs - they get added before rosfran@8: dnl whatevertarget_LIBS and -L flags here affect the rest of the linking rosfran@9: GST_PLUGIN_LDFLAGS="-module -avoid-version $GST_PLUGINS_DIR" rosfran@8: AC_SUBST(GST_PLUGIN_LDFLAGS) rosfran@8: rosfran@8: # check for gstreamer development files leo_sobral@2: PKG_CHECK_MODULES(GST, \ leo_sobral@2: gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED, leo_sobral@2: HAVE_GST=yes, HAVE_GST=no) leo_sobral@2: leo_sobral@2: # Give error and exit if we don't have gstreamer leo_sobral@2: if test "x$HAVE_GST" = "xno"; then leo_sobral@2: AC_MSG_ERROR(you need gstreamer development packages installed !) leo_sobral@2: fi leo_sobral@2: leo_sobral@2: # make GST_CFLAGS and GST_LIBS available leo_sobral@2: AC_SUBST(GST_CFLAGS) leo_sobral@2: AC_SUBST(GST_LIBS) leo_sobral@2: leo_sobral@2: # check for gstreamer-base plugins (xoverlay interface) leo_sobral@285: GST_BASE_REQUIRED=0.10 leo_sobral@285: GST_BASE_MAJORMINOR=0.10 leo_sobral@285: PKG_CHECK_MODULES(GST_BASE, \ leo_sobral@285: gstreamer-base-$GST_BASE_MAJORMINOR >= $GST_BASE_REQUIRED, leo_sobral@285: HAVE_GST_BASE=yes, HAVE_GST_BASE=no) leo_sobral@2: leo_sobral@2: # Give error and exit if we don't have gstreamer base libraries leo_sobral@285: if test "x$HAVE_GST_BASE" = "xno"; then leo_sobral@2: AC_MSG_ERROR(you need gstreamer base development packages installed !) leo_sobral@2: fi leo_sobral@2: leo_sobral@285: # make GST_BASE_CFLAGS and GST_BASE_LIBS available leo_sobral@285: AC_SUBST(GST_BASE_CFLAGS) leo_sobral@285: AC_SUBST(GST_BASE_LIBS) leo_sobral@2: leo_sobral@2: # make GST_MAJORMINOR available in Makefile.am leo_sobral@2: AC_SUBST(GST_MAJORMINOR) leo_sobral@2: abnerf@13: AC_CONFIG_FILES([ abnerf@13: Makefile abnerf@13: src/Makefile abnerf@13: ]) leo_sobral@2: leo_sobral@2: AC_OUTPUT