1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/gmyth-stream/client/configure.ac Tue Apr 24 19:15:35 2007 +0100
1.3 @@ -0,0 +1,79 @@
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-stream],[0.1])
1.10 +
1.11 +AC_CONFIG_MACRO_DIR([m4])
1.12 +AC_CONFIG_HEADER(config.h)
1.13 +
1.14 +AS_VERSION(gmyth-stream, GMYTH_STREAM, 0, 1, 0, 0, GMYTH_STREAM_SVN="no", GMYTH_STREAM_SVN="yes")
1.15 +GMYTH_STREAM_MAJORMINOR=$GMYTH_STREAM_MAJOR_VERSION.$GMYTH_STREAM_MINOR_VERSION
1.16 +AC_SUBST(GMYTH_STREAM_MAJORMINOR)
1.17 +
1.18 +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
1.19 +AM_MAINTAINER_MODE
1.20 +dnl make aclocal work in maintainer mode
1.21 +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
1.22 +
1.23 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
1.24 +
1.25 +# Checks for programs.
1.26 +# check for tools
1.27 +# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
1.28 +CFLAGS="$CFLAGS -Wall"
1.29 +AC_PROG_CC
1.30 +AC_PROG_LIBTOOL
1.31 +
1.32 +# Checks for libraries.
1.33 +
1.34 +# Checks for header files.
1.35 +AC_HEADER_STDC
1.36 +
1.37 +#Test if --disable-debug given
1.38 +AC_ARG_ENABLE(debug,
1.39 + AC_HELP_STRING([--disable-debug], [enable debugging mode]))
1.40 +if test x"$enable_debug" != xno; then
1.41 + CFLAGS="$CFLAGS -g -DGMYTH_STREAM_USE_DEBUG"
1.42 +else
1.43 + CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
1.44 +fi
1.45 +
1.46 +
1.47 +# Checks required packages ####################################################
1.48 +###############################################################################
1.49 +
1.50 +## Check for pkgconfig ########################################################
1.51 +###############################################################################
1.52 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
1.53 +if test "x$HAVE_PKGCONFIG" = "xno"; then
1.54 + AC_MSG_ERROR(you need to have pkgconfig installed !)
1.55 +fi
1.56 +
1.57 +## Check for Glib2.0 ##########################################################
1.58 +###############################################################################
1.59 +PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
1.60 +if test "x$HAVE_GLIB" = "xno"; then
1.61 + AC_MSG_ERROR(you need glib-2.0 installed)
1.62 +fi
1.63 +AC_SUBST(GLIB_CFLAGS)
1.64 +AC_SUBST(GLIB_LIBS)
1.65 +
1.66 +AC_SUBST(CFLAGS)
1.67 +AC_SUBST(LDFLAGS)
1.68 +AC_SUBST(LIBS)
1.69 +
1.70 +AC_OUTPUT([
1.71 +Makefile
1.72 +gmyth-stream-client.pc
1.73 +src/Makefile
1.74 +test/Makefile
1.75 +])
1.76 +
1.77 +if test "x$enable_debug" != "xno"; then
1.78 + AC_MSG_NOTICE([Debug: Enabled])
1.79 +else
1.80 + AC_MSG_NOTICE([Debug: Disabled])
1.81 +fi
1.82 +