maemo-ui-old/configure.ac
branchtrunk
changeset 798 19626dc62c16
parent 416 f176c8207077
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/maemo-ui-old/configure.ac	Fri Aug 10 14:45:36 2007 +0100
     1.3 @@ -0,0 +1,229 @@
     1.4 +#                                               -*- Autoconf -*-
     1.5 +# Process this file with autoconf to produce a configure script.
     1.6 +
     1.7 +AC_PREREQ(2.50)
     1.8 +
     1.9 +AC_INIT([maemo-myth],[0.1])
    1.10 +
    1.11 +dnl AC_CONFIG_SRCDIR([src/mmyth_main.c])
    1.12 +AC_CONFIG_HEADER(config.h)
    1.13 +
    1.14 +dnl when going to/from release please set the nano (fourth number) right !
    1.15 +dnl releases only do Wall, SVN and prerelease does Werror too
    1.16 +AS_VERSION(maemo-myth, GMYTH, 0, 1, 0, 3, GMYTH_SVN="no", GMYTH_SVN="yes")
    1.17 +
    1.18 +GMYTH_MAJORMINOR=$GMYTH_MAJOR_VERSION.$GMYTH_MINOR_VERSION
    1.19 +
    1.20 +AC_SUBST(GMYTH_MAJORMINOR)
    1.21 +
    1.22 +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    1.23 +AM_MAINTAINER_MODE
    1.24 +dnl make aclocal work in maintainer mode
    1.25 +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    1.26 +
    1.27 +# Checks for programs.
    1.28 +# check for tools
    1.29 +# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    1.30 +CFLAGS="$CFLAGS -Wall"
    1.31 +AC_PROG_CC
    1.32 +AC_PROG_LIBTOOL
    1.33 +
    1.34 +# Checks for libraries.
    1.35 +
    1.36 +# Checks for header files.
    1.37 +AC_HEADER_STDC
    1.38 +AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
    1.39 +
    1.40 +# Checks for typedefs, structures, and compiler characteristics.
    1.41 +AC_C_CONST
    1.42 +AC_TYPE_PID_T
    1.43 +AC_STRUCT_TM
    1.44 +
    1.45 +# Checks for library functions.
    1.46 +AC_FUNC_FORK
    1.47 +AC_PROG_GCC_TRADITIONAL
    1.48 +AC_FUNC_MALLOC
    1.49 +AC_FUNC_MKTIME
    1.50 +AC_FUNC_VPRINTF
    1.51 +AC_CHECK_FUNCS([memset socket stime strstr strtoul])
    1.52 +
    1.53 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    1.54 +
    1.55 +# Checks required packages
    1.56 +
    1.57 +dnl Test if --disable-debug given
    1.58 +AC_ARG_ENABLE(debug,
    1.59 +	[AC_HELP_STRING([--disable-debug], [disable debugging mode])],
    1.60 +	enable_debug="$enableval",
    1.61 +	enable_debug=yes)
    1.62 +
    1.63 +if test "x$enable_debug" = "xyes" ; then
    1.64 +      CFLAGS="$CFLAGS -g"
    1.65 +else
    1.66 +      AC_DEFINE( NDEBUG, 1, [disable debug messages] )
    1.67 +      CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
    1.68 +fi          
    1.69 +
    1.70 +AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
    1.71 +
    1.72 +# Check for pkgconfig
    1.73 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    1.74 +# Give error and exit if we don't have pkgconfig
    1.75 +if test "x$HAVE_PKGCONFIG" = "xno"; then
    1.76 +  AC_MSG_ERROR(you need to have pkgconfig installed !)
    1.77 +fi
    1.78 +
    1.79 +# Check for Glib2.0
    1.80 +PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
    1.81 +
    1.82 +# Give error and exit if we don't have glib
    1.83 +if test "x$HAVE_GLIB" = "xno"; then
    1.84 +  AC_MSG_ERROR(you need glib-2.0 installed)
    1.85 +fi
    1.86 +
    1.87 +# make GLIB_CFLAGS and GLIB_LIBS available
    1.88 +AC_SUBST(GLIB_CFLAGS)
    1.89 +AC_SUBST(GLIB_LIBS)
    1.90 +
    1.91 +# Check for GObject2.0
    1.92 +PKG_CHECK_MODULES(GOBJECT,
    1.93 +  gobject-2.0,
    1.94 +  HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
    1.95 +
    1.96 +# Give error and exit if we don't have gobject
    1.97 +if test "x$HAVE_GOBJECT" = "xno"; then
    1.98 +  AC_MSG_ERROR(you need gobject-2.0 installed)
    1.99 +fi
   1.100 +
   1.101 +# make GOBJECT_CFLAGS and GOBJECT_LIBS available
   1.102 +AC_SUBST(GOBJECT_CFLAGS)
   1.103 +AC_SUBST(GOBJECT_LIBS)
   1.104 +
   1.105 +# Check for GTK+-2.0
   1.106 +PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK=yes,HAVE_GTK=no)
   1.107 +
   1.108 +# Give error and exit if we don't have gtk
   1.109 +if test "x$HAVE_GTK" = "xyes"; then
   1.110 +  AC_DEFINE(WITH_GTK, 1, [build with GTK+ related stuff])
   1.111 +  dnl AC_MSG_ERROR(you need gtk+-2.0 installed)
   1.112 +else
   1.113 +  AC_MSG_RESULT(no)
   1.114 +fi
   1.115 +
   1.116 +AM_CONDITIONAL(WITH_GTK, test "x$HAVE_GTK" = "xyes" )
   1.117 +
   1.118 +# make GTK_CFLAGS and GTK_LIBS available
   1.119 +AC_SUBST(GTK_CFLAGS)
   1.120 +AC_SUBST(GTK_LIBS)
   1.121 +
   1.122 +dnl ========== Check for Hildon Libraries
   1.123 +PKG_CHECK_MODULES(HILDON,
   1.124 +  libosso hildon-lgpl libosso hildon-status-bar-lib libhildonmenu hildon-base-lib hildon-control-panel hildon-libs,
   1.125 +  HAVE_HILDON=yes, HAVE_HILDON=no)
   1.126 +
   1.127 +if test "x$HAVE_HILDON" = "xyes"; then
   1.128 +  HILDON_CFLAGS="$HILDON_CFLAGS -DMAEMO_PLATFORM"
   1.129 +  AC_DEFINE(MAEMO_PLATFORM, 1, [build with hildon libs])
   1.130 +else
   1.131 +  AC_MSG_RESULT(no)
   1.132 +fi
   1.133 +
   1.134 +AM_CONDITIONAL(MAEMO_PLATFORM, test "x$HAVE_HILDON" = "xyes")
   1.135 +
   1.136 +dnl make HILDON_CFLAGS and HILDON_LIBS available
   1.137 +AC_SUBST(HILDON_CFLAGS)
   1.138 +AC_SUBST(HILDON_LIBS)
   1.139 +
   1.140 +# Check for libxml-2.0
   1.141 +PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
   1.142 +
   1.143 +# Give error and exit if we don't have libxml
   1.144 +if test "x$HAVE_LIBXML" = "xno"; then
   1.145 +  AC_MSG_ERROR(you need libxml-2.0 installed)
   1.146 +fi
   1.147 +
   1.148 +# make LIBXML_CFLAGS and LIBXML_LIBS available
   1.149 +AC_SUBST(LIBXML_CFLAGS)
   1.150 +AC_SUBST(LIBXML_LIBS)
   1.151 +
   1.152 +
   1.153 +# check for gstreamer development files
   1.154 +GST_REQUIRED=0.10
   1.155 +GST_MAJORMINOR=0.10
   1.156 +PKG_CHECK_MODULES(GST, \
   1.157 +  gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
   1.158 +  HAVE_GST=yes, HAVE_GST=no)
   1.159 +
   1.160 +# Give error and exit if we don't have gstreamer
   1.161 +if test "x$HAVE_GST" = "xno"; then
   1.162 +  AC_MSG_ERROR(you need gstreamer development packages installed !)
   1.163 +fi
   1.164 +
   1.165 +# make GST_CFLAGS and GST_LIBS available
   1.166 +AC_SUBST(GST_CFLAGS)
   1.167 +AC_SUBST(GST_LIBS)
   1.168 +
   1.169 +# check for gstreamer-base plugins (xoverlay interface)
   1.170 +GSTBASE_REQUIRED=0.10
   1.171 +GSTBASE_MAJORMINOR=0.10
   1.172 +PKG_CHECK_MODULES(GSTBASE, \
   1.173 +  gstreamer-base-$GSTBASE_MAJORMINOR >= $GSTBASE_REQUIRED,
   1.174 +  HAVE_GSTBASE=yes, HAVE_GSTBASE=no)
   1.175 +
   1.176 +# Give error and exit if we don't have gstreamer base libraries
   1.177 +if test "x$HAVE_GSTBASE" = "xno"; then
   1.178 +  AC_MSG_ERROR(you need gstreamer base development packages installed !)
   1.179 +fi
   1.180 +
   1.181 +# make GSTBASE_CFLAGS and GSTBASE_LIBS available
   1.182 +AC_SUBST(GSTBASE_CFLAGS)
   1.183 +AC_SUBST(GSTBASE_LIBS)
   1.184 +
   1.185 +# make GST_MAJORMINOR available in Makefile.am
   1.186 +AC_SUBST(GST_MAJORMINOR)
   1.187 +
   1.188 +
   1.189 +# check for gstreamer-base plugins (xoverlay interface)
   1.190 +GSTPLUGINSBASE_REQUIRED=0.10
   1.191 +GSTPLUGINSBASE_MAJORMINOR=0.10
   1.192 +PKG_CHECK_MODULES(GSTPLUGINSBASE, \
   1.193 +  gstreamer-plugins-base-$GSTPLUGINSBASE_MAJORMINOR >= $GSTPLUGINSBASE_REQUIRED,
   1.194 +  HAVE_GSTPLUGINSBASE=yes, HAVE_GSTPLUGINSBASE=no)
   1.195 +
   1.196 +# Give error and exit if we don't have gstreamer base libraries
   1.197 +if test "x$HAVE_GSTPLUGINSBASE" = "xno"; then
   1.198 +  AC_MSG_ERROR(you need gstreamer plugins base development packages installed !)
   1.199 +fi
   1.200 +
   1.201 +# make GSTPLUGINSBASE_CFLAGS and GSTPLUGINSBASE_LIBS available
   1.202 +AC_SUBST(GSTPLUGINSBASE_CFLAGS)
   1.203 +AC_SUBST(GSTPLUGINSBASE_LIBS)
   1.204 +
   1.205 +# check for gstreamer-interfaces (xoverlay interface)
   1.206 +AC_CHECK_FUNC( gst_x_overlay_get_type,
   1.207 +  HAVE_GSTINTERFACES=yes, HAVE_GSTINTERFACES=no )
   1.208 +
   1.209 +# Give error and exit if we don't have gstreamer base libraries
   1.210 +if test "x$HAVE_GSTINTERFACES" = "xno"; then
   1.211 +  AC_MSG_NOTICE(you need gstreamer interfaces development packages installed !)
   1.212 +  CFLAGS="$CFLAGS -lgstinterfaces-$GSTPLUGINSBASE_MAJORMINOR"
   1.213 +fi
   1.214 +
   1.215 +# Check for gmyth-0.1
   1.216 +
   1.217 +PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
   1.218 +
   1.219 +# Give error and exit if we don't have gmyth-0.1
   1.220 +if test "x$HAVE_LIBGMYTH" = "xno"; then
   1.221 +  AC_MSG_ERROR(you need gmyth-0.1 installed)
   1.222 +fi
   1.223 +
   1.224 +# make LIBXML_CFLAGS and LIBXML_LIBS available
   1.225 +AC_SUBST(LIBGMYTH_CFLAGS)
   1.226 +AC_SUBST(LIBGMYTH_LIBS)
   1.227 +
   1.228 +
   1.229 +AC_CONFIG_FILES([Makefile
   1.230 +                src/Makefile
   1.231 +                pixmaps/Makefile])
   1.232 +AC_OUTPUT