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: leo_sobral@2: dnl AC_CONFIG_SRCDIR([src/mmyth_main.c]) 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: leo_sobral@2: # check for gstreamer development files leo_sobral@2: GST_REQUIRED=0.10 leo_sobral@2: GST_MAJORMINOR=0.10 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@2: GSTBASE_REQUIRED=0.10 leo_sobral@2: GSTBASE_MAJORMINOR=0.10 leo_sobral@2: PKG_CHECK_MODULES(GSTBASE, \ leo_sobral@2: gstreamer-base-$GSTBASE_MAJORMINOR >= $GSTBASE_REQUIRED, leo_sobral@2: HAVE_GSTBASE=yes, HAVE_GSTBASE=no) leo_sobral@2: leo_sobral@2: # Give error and exit if we don't have gstreamer base libraries leo_sobral@2: if test "x$HAVE_GSTBASE" = "xno"; then leo_sobral@2: AC_MSG_ERROR(you need gstreamer base development packages installed !) leo_sobral@2: fi leo_sobral@2: leo_sobral@2: # make GSTBASE_CFLAGS and GSTBASE_LIBS available leo_sobral@2: AC_SUBST(GSTBASE_CFLAGS) leo_sobral@2: AC_SUBST(GSTBASE_LIBS) leo_sobral@2: leo_sobral@2: # make GST_MAJORMINOR available in Makefile.am leo_sobral@2: AC_SUBST(GST_MAJORMINOR) leo_sobral@2: leo_sobral@2: AC_CONFIG_FILES([Makefile]) leo_sobral@2: leo_sobral@2: AC_OUTPUT