maemo-ui-old/configure.ac
author melunko
Wed Aug 01 14:50:29 2007 +0100 (2007-08-01)
branchtrunk
changeset 790 7a914b3fafc1
parent 416 maemo-ui/configure.ac@f176c8207077
permissions -rw-r--r--
[svn r796] Moved maemo-ui to maemo-ui-old
     1 #                                               -*- Autoconf -*-
     2 # Process this file with autoconf to produce a configure script.
     3 
     4 AC_PREREQ(2.50)
     5 
     6 AC_INIT([maemo-myth],[0.1])
     7 
     8 dnl AC_CONFIG_SRCDIR([src/mmyth_main.c])
     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(maemo-myth, GMYTH, 0, 1, 0, 3, GMYTH_SVN="no", GMYTH_SVN="yes")
    14 
    15 GMYTH_MAJORMINOR=$GMYTH_MAJOR_VERSION.$GMYTH_MINOR_VERSION
    16 
    17 AC_SUBST(GMYTH_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 
    31 # Checks for libraries.
    32 
    33 # Checks for header files.
    34 AC_HEADER_STDC
    35 AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
    36 
    37 # Checks for typedefs, structures, and compiler characteristics.
    38 AC_C_CONST
    39 AC_TYPE_PID_T
    40 AC_STRUCT_TM
    41 
    42 # Checks for library functions.
    43 AC_FUNC_FORK
    44 AC_PROG_GCC_TRADITIONAL
    45 AC_FUNC_MALLOC
    46 AC_FUNC_MKTIME
    47 AC_FUNC_VPRINTF
    48 AC_CHECK_FUNCS([memset socket stime strstr strtoul])
    49 
    50 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    51 
    52 # Checks required packages
    53 
    54 dnl Test if --disable-debug given
    55 AC_ARG_ENABLE(debug,
    56 	[AC_HELP_STRING([--disable-debug], [disable debugging mode])],
    57 	enable_debug="$enableval",
    58 	enable_debug=yes)
    59 
    60 if test "x$enable_debug" = "xyes" ; then
    61       CFLAGS="$CFLAGS -g"
    62 else
    63       AC_DEFINE( NDEBUG, 1, [disable debug messages] )
    64       CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
    65 fi          
    66 
    67 AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
    68 
    69 # Check for pkgconfig
    70 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    71 # Give error and exit if we don't have pkgconfig
    72 if test "x$HAVE_PKGCONFIG" = "xno"; then
    73   AC_MSG_ERROR(you need to have pkgconfig installed !)
    74 fi
    75 
    76 # Check for Glib2.0
    77 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
    78 
    79 # Give error and exit if we don't have glib
    80 if test "x$HAVE_GLIB" = "xno"; then
    81   AC_MSG_ERROR(you need glib-2.0 installed)
    82 fi
    83 
    84 # make GLIB_CFLAGS and GLIB_LIBS available
    85 AC_SUBST(GLIB_CFLAGS)
    86 AC_SUBST(GLIB_LIBS)
    87 
    88 # Check for GObject2.0
    89 PKG_CHECK_MODULES(GOBJECT,
    90   gobject-2.0,
    91   HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
    92 
    93 # Give error and exit if we don't have gobject
    94 if test "x$HAVE_GOBJECT" = "xno"; then
    95   AC_MSG_ERROR(you need gobject-2.0 installed)
    96 fi
    97 
    98 # make GOBJECT_CFLAGS and GOBJECT_LIBS available
    99 AC_SUBST(GOBJECT_CFLAGS)
   100 AC_SUBST(GOBJECT_LIBS)
   101 
   102 # Check for GTK+-2.0
   103 PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK=yes,HAVE_GTK=no)
   104 
   105 # Give error and exit if we don't have gtk
   106 if test "x$HAVE_GTK" = "xyes"; then
   107   AC_DEFINE(WITH_GTK, 1, [build with GTK+ related stuff])
   108   dnl AC_MSG_ERROR(you need gtk+-2.0 installed)
   109 else
   110   AC_MSG_RESULT(no)
   111 fi
   112 
   113 AM_CONDITIONAL(WITH_GTK, test "x$HAVE_GTK" = "xyes" )
   114 
   115 # make GTK_CFLAGS and GTK_LIBS available
   116 AC_SUBST(GTK_CFLAGS)
   117 AC_SUBST(GTK_LIBS)
   118 
   119 dnl ========== Check for Hildon Libraries
   120 PKG_CHECK_MODULES(HILDON,
   121   libosso hildon-lgpl libosso hildon-status-bar-lib libhildonmenu hildon-base-lib hildon-control-panel hildon-libs,
   122   HAVE_HILDON=yes, HAVE_HILDON=no)
   123 
   124 if test "x$HAVE_HILDON" = "xyes"; then
   125   HILDON_CFLAGS="$HILDON_CFLAGS -DMAEMO_PLATFORM"
   126   AC_DEFINE(MAEMO_PLATFORM, 1, [build with hildon libs])
   127 else
   128   AC_MSG_RESULT(no)
   129 fi
   130 
   131 AM_CONDITIONAL(MAEMO_PLATFORM, test "x$HAVE_HILDON" = "xyes")
   132 
   133 dnl make HILDON_CFLAGS and HILDON_LIBS available
   134 AC_SUBST(HILDON_CFLAGS)
   135 AC_SUBST(HILDON_LIBS)
   136 
   137 # Check for libxml-2.0
   138 PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
   139 
   140 # Give error and exit if we don't have libxml
   141 if test "x$HAVE_LIBXML" = "xno"; then
   142   AC_MSG_ERROR(you need libxml-2.0 installed)
   143 fi
   144 
   145 # make LIBXML_CFLAGS and LIBXML_LIBS available
   146 AC_SUBST(LIBXML_CFLAGS)
   147 AC_SUBST(LIBXML_LIBS)
   148 
   149 
   150 # check for gstreamer development files
   151 GST_REQUIRED=0.10
   152 GST_MAJORMINOR=0.10
   153 PKG_CHECK_MODULES(GST, \
   154   gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
   155   HAVE_GST=yes, HAVE_GST=no)
   156 
   157 # Give error and exit if we don't have gstreamer
   158 if test "x$HAVE_GST" = "xno"; then
   159   AC_MSG_ERROR(you need gstreamer development packages installed !)
   160 fi
   161 
   162 # make GST_CFLAGS and GST_LIBS available
   163 AC_SUBST(GST_CFLAGS)
   164 AC_SUBST(GST_LIBS)
   165 
   166 # check for gstreamer-base plugins (xoverlay interface)
   167 GSTBASE_REQUIRED=0.10
   168 GSTBASE_MAJORMINOR=0.10
   169 PKG_CHECK_MODULES(GSTBASE, \
   170   gstreamer-base-$GSTBASE_MAJORMINOR >= $GSTBASE_REQUIRED,
   171   HAVE_GSTBASE=yes, HAVE_GSTBASE=no)
   172 
   173 # Give error and exit if we don't have gstreamer base libraries
   174 if test "x$HAVE_GSTBASE" = "xno"; then
   175   AC_MSG_ERROR(you need gstreamer base development packages installed !)
   176 fi
   177 
   178 # make GSTBASE_CFLAGS and GSTBASE_LIBS available
   179 AC_SUBST(GSTBASE_CFLAGS)
   180 AC_SUBST(GSTBASE_LIBS)
   181 
   182 # make GST_MAJORMINOR available in Makefile.am
   183 AC_SUBST(GST_MAJORMINOR)
   184 
   185 
   186 # check for gstreamer-base plugins (xoverlay interface)
   187 GSTPLUGINSBASE_REQUIRED=0.10
   188 GSTPLUGINSBASE_MAJORMINOR=0.10
   189 PKG_CHECK_MODULES(GSTPLUGINSBASE, \
   190   gstreamer-plugins-base-$GSTPLUGINSBASE_MAJORMINOR >= $GSTPLUGINSBASE_REQUIRED,
   191   HAVE_GSTPLUGINSBASE=yes, HAVE_GSTPLUGINSBASE=no)
   192 
   193 # Give error and exit if we don't have gstreamer base libraries
   194 if test "x$HAVE_GSTPLUGINSBASE" = "xno"; then
   195   AC_MSG_ERROR(you need gstreamer plugins base development packages installed !)
   196 fi
   197 
   198 # make GSTPLUGINSBASE_CFLAGS and GSTPLUGINSBASE_LIBS available
   199 AC_SUBST(GSTPLUGINSBASE_CFLAGS)
   200 AC_SUBST(GSTPLUGINSBASE_LIBS)
   201 
   202 # check for gstreamer-interfaces (xoverlay interface)
   203 AC_CHECK_FUNC( gst_x_overlay_get_type,
   204   HAVE_GSTINTERFACES=yes, HAVE_GSTINTERFACES=no )
   205 
   206 # Give error and exit if we don't have gstreamer base libraries
   207 if test "x$HAVE_GSTINTERFACES" = "xno"; then
   208   AC_MSG_NOTICE(you need gstreamer interfaces development packages installed !)
   209   CFLAGS="$CFLAGS -lgstinterfaces-$GSTPLUGINSBASE_MAJORMINOR"
   210 fi
   211 
   212 # Check for gmyth-0.1
   213 
   214 PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
   215 
   216 # Give error and exit if we don't have gmyth-0.1
   217 if test "x$HAVE_LIBGMYTH" = "xno"; then
   218   AC_MSG_ERROR(you need gmyth-0.1 installed)
   219 fi
   220 
   221 # make LIBXML_CFLAGS and LIBXML_LIBS available
   222 AC_SUBST(LIBGMYTH_CFLAGS)
   223 AC_SUBST(LIBGMYTH_LIBS)
   224 
   225 
   226 AC_CONFIG_FILES([Makefile
   227                 src/Makefile
   228                 pixmaps/Makefile])
   229 AC_OUTPUT