1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/gmyth-upnp/m4/configure.ac Mon Apr 30 18:16:36 2007 +0100
1.3 @@ -0,0 +1,234 @@
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([gmyth],[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(gmyth, 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 +dnl Generate doxygen documentation
1.35 +DX_HTML_FEATURE(ON)
1.36 +DX_CHM_FEATURE(OFF)
1.37 +DX_CHI_FEATURE(OFF)
1.38 +DX_MAN_FEATURE(OFF)
1.39 +DX_RTF_FEATURE(OFF)
1.40 +DX_XML_FEATURE(OFF)
1.41 +DX_PDF_FEATURE(OFF)
1.42 +DX_PS_FEATURE(OFF)
1.43 +DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs)
1.44 +
1.45 +
1.46 +# Checks for libraries.
1.47 +
1.48 +# Checks for header files.
1.49 +AC_HEADER_STDC
1.50 +AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
1.51 +
1.52 +# Checks for typedefs, structures, and compiler characteristics.
1.53 +AC_C_CONST
1.54 +AC_TYPE_PID_T
1.55 +AC_STRUCT_TM
1.56 +
1.57 +# Checks for library functions.
1.58 +AC_FUNC_FORK
1.59 +AC_PROG_GCC_TRADITIONAL
1.60 +AC_FUNC_MALLOC
1.61 +AC_FUNC_MKTIME
1.62 +AC_FUNC_VPRINTF
1.63 +AC_CHECK_FUNCS([memset socket stime strstr strtoul])
1.64 +
1.65 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
1.66 +
1.67 +# Checks required packages
1.68 +
1.69 +dnl Test if --disable-debug given
1.70 +AC_ARG_ENABLE(debug,
1.71 + [AC_HELP_STRING([--disable-debug], [disable debugging mode])],
1.72 + enable_debug="$enableval",
1.73 + enable_debug=yes)
1.74 +
1.75 +if test "x$enable_debug" = "xyes" ; then
1.76 + CFLAGS="$CFLAGS -g"
1.77 +else
1.78 + AC_DEFINE( NDEBUG, 1, [disable debug messages] )
1.79 + CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS -DNDEBUG"
1.80 +fi
1.81 +
1.82 +AM_CONDITIONAL( NDEBUG, test "x$enable_debug" = "xyes" )
1.83 +
1.84 +# Check for pkgconfig
1.85 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
1.86 +# Give error and exit if we don't have pkgconfig
1.87 +if test "x$HAVE_PKGCONFIG" = "xno"; then
1.88 + AC_MSG_ERROR(you need to have pkgconfig installed !)
1.89 +fi
1.90 +
1.91 +# Check for Glib2.0
1.92 +PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
1.93 +
1.94 +# Give error and exit if we don't have glib
1.95 +if test "x$HAVE_GLIB" = "xno"; then
1.96 + AC_MSG_ERROR(you need glib-2.0 installed)
1.97 +fi
1.98 +
1.99 +# make GLIB_CFLAGS and GLIB_LIBS available
1.100 +AC_SUBST(GLIB_CFLAGS)
1.101 +AC_SUBST(GLIB_LIBS)
1.102 +
1.103 +# Check for GObject2.0
1.104 +PKG_CHECK_MODULES(GOBJECT,
1.105 + gobject-2.0,
1.106 + HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
1.107 +
1.108 +# Give error and exit if we don't have gobject
1.109 +if test "x$HAVE_GOBJECT" = "xno"; then
1.110 + AC_MSG_ERROR(you need gobject-2.0 installed)
1.111 +fi
1.112 +
1.113 +# make GOBJECT_CFLAGS and GOBJECT_LIBS available
1.114 +AC_SUBST(GOBJECT_CFLAGS)
1.115 +AC_SUBST(GOBJECT_LIBS)
1.116 +
1.117 +# Check for GTK+-2.0
1.118 +PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK=yes,HAVE_GTK=no)
1.119 +
1.120 +# Give error and exit if we don't have gtk
1.121 +if test "x$HAVE_GTK" = "xyes"; then
1.122 + AC_DEFINE(WITH_GTK, 1, [build with GTK+ related stuff])
1.123 + dnl AC_MSG_ERROR(you need gtk+-2.0 installed)
1.124 +else
1.125 + AC_MSG_RESULT(no)
1.126 +fi
1.127 +
1.128 +AM_CONDITIONAL(WITH_GTK, test "x$HAVE_GTK" = "xyes" )
1.129 +
1.130 +# make GTK_CFLAGS and GTK_LIBS available
1.131 +AC_SUBST(GTK_CFLAGS)
1.132 +AC_SUBST(GTK_LIBS)
1.133 +
1.134 +dnl ========== Check for Hildon Libraries
1.135 +PKG_CHECK_MODULES(HILDON,
1.136 + hildon-lgpl libosso hildon-status-bar-lib libhildonmenu hildon-base-lib hildon-control-panel hildon-libs,
1.137 + HAVE_HILDON=yes, HAVE_HILDON=no)
1.138 +
1.139 +if test "x$HAVE_HILDON" = "xyes"; then
1.140 + AC_DEFINE(MAEMO_PLATFORM, 1, [build with hildon libs])
1.141 + HILDON_CFLAGS="$HILDON_CFLAGS -DMAEMO_PLATFORM=1"
1.142 +else
1.143 + AC_MSG_RESULT(no)
1.144 +fi
1.145 +
1.146 +AM_CONDITIONAL(MAEMO_PLATFORM, test "x$HAVE_HILDON" = "xyes")
1.147 +
1.148 +dnl make HILDON_CFLAGS and HILDON_LIBS available
1.149 +AC_SUBST(HILDON_CFLAGS)
1.150 +AC_SUBST(HILDON_LIBS)
1.151 +
1.152 +# Check for libxml-2.0
1.153 +PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
1.154 +
1.155 +# Give error and exit if we don't have libxml
1.156 +if test "x$HAVE_LIBXML" = "xno"; then
1.157 + AC_MSG_ERROR(you need libxml-2.0 installed)
1.158 +fi
1.159 +
1.160 +# make LIBXML_CFLAGS and LIBXML_LIBS available
1.161 +AC_SUBST(LIBXML_CFLAGS)
1.162 +AC_SUBST(LIBXML_LIBS)
1.163 +
1.164 +
1.165 +# check for gstreamer development files
1.166 +GST_REQUIRED=0.10
1.167 +GST_MAJORMINOR=0.10
1.168 +PKG_CHECK_MODULES(GST, \
1.169 + gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
1.170 + HAVE_GST=yes, HAVE_GST=no)
1.171 +
1.172 +# Give error and exit if we don't have gstreamer
1.173 +if test "x$HAVE_GST" = "xno"; then
1.174 + AC_MSG_ERROR(you need gstreamer development packages installed !)
1.175 +fi
1.176 +
1.177 +# make GST_CFLAGS and GST_LIBS available
1.178 +AC_SUBST(GST_CFLAGS)
1.179 +AC_SUBST(GST_LIBS)
1.180 +
1.181 +# check for gstreamer-base plugins (xoverlay interface)
1.182 +GSTBASE_REQUIRED=0.10
1.183 +GSTBASE_MAJORMINOR=0.10
1.184 +PKG_CHECK_MODULES(GSTBASE, \
1.185 + gstreamer-base-$GSTBASE_MAJORMINOR >= $GSTBASE_REQUIRED,
1.186 + HAVE_GSTBASE=yes, HAVE_GSTBASE=no)
1.187 +
1.188 +# Give error and exit if we don't have gstreamer base libraries
1.189 +if test "x$HAVE_GSTBASE" = "xno"; then
1.190 + AC_MSG_ERROR(you need gstreamer base development packages installed !)
1.191 +fi
1.192 +
1.193 +# make GSTBASE_CFLAGS and GSTBASE_LIBS available
1.194 +AC_SUBST(GSTBASE_CFLAGS)
1.195 +AC_SUBST(GSTBASE_LIBS)
1.196 +
1.197 +
1.198 +# make GST_MAJORMINOR available in Makefile.am
1.199 +AC_SUBST(GST_MAJORMINOR)
1.200 +
1.201 +#
1.202 +# mysql libraries
1.203 +#
1.204 +AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`)
1.205 +if test -z "$MYSQL_CFLAGS"; then
1.206 + AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
1.207 +fi
1.208 +AC_SUBST(MYSQL_CFLAGS)
1.209 +
1.210 +
1.211 +AC_CHECK_PROG(MYSQL_LIBS,mysql_config,`mysql_config --libs`)
1.212 +if test -z "$MYSQL_LIBS"; then
1.213 + AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
1.214 +fi
1.215 +AC_SUBST(MYSQL_LIBS)
1.216 +
1.217 +## Check for gmyth-0.1
1.218 +
1.219 +PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
1.220 +
1.221 +# Give error and exit if we don't have gmyth-0.1
1.222 +if test "x$HAVE_LIBGMYTH" = "xno"; then
1.223 + AC_MSG_ERROR(you need gmyth-0.1 installed)
1.224 +fi
1.225 +
1.226 +# make LIBXML_CFLAGS and LIBXML_LIBS available
1.227 +AC_SUBST(LIBGMYTH_CFLAGS)
1.228 +AC_SUBST(LIBGMYTH_LIBS)
1.229 +
1.230 +#dnl Enable gtk-doc
1.231 +#GTK_DOC_CHECK(1.4)
1.232 +
1.233 +
1.234 +AC_CONFIG_FILES([Makefile
1.235 + src/Makefile
1.236 + pixmaps/Makefile])
1.237 +AC_OUTPUT