gmyth-stream/client/configure.ac
author rosfran
Wed Apr 25 21:31:00 2007 +0100 (2007-04-25)
branchtrunk
changeset 596 2097ef19ce9a
permissions -rw-r--r--
[svn r602] Test scripts variable clean-up.
renatofilho@520
     1
#                                               -*- Autoconf -*-
renatofilho@520
     2
# Process this file with autoconf to produce a configure script.
renatofilho@520
     3
renatofilho@520
     4
AC_PREREQ(2.50)
renatofilho@520
     5
renatofilho@520
     6
AC_INIT([gmyth-stream],[0.1])
renatofilho@520
     7
renatofilho@520
     8
AC_CONFIG_MACRO_DIR([m4])
renatofilho@520
     9
AC_CONFIG_HEADER(config.h)
renatofilho@520
    10
renatofilho@520
    11
AS_VERSION(gmyth-stream, GMYTH_STREAM, 0, 1, 0, 0, GMYTH_STREAM_SVN="no", GMYTH_STREAM_SVN="yes")
renatofilho@520
    12
GMYTH_STREAM_MAJORMINOR=$GMYTH_STREAM_MAJOR_VERSION.$GMYTH_STREAM_MINOR_VERSION
renatofilho@520
    13
AC_SUBST(GMYTH_STREAM_MAJORMINOR)
renatofilho@520
    14
renatofilho@520
    15
dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
renatofilho@520
    16
AM_MAINTAINER_MODE
renatofilho@520
    17
dnl make aclocal work in maintainer mode
renatofilho@520
    18
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
renatofilho@520
    19
renatofilho@520
    20
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
renatofilho@520
    21
renatofilho@520
    22
# Checks for programs.
renatofilho@520
    23
# check for tools
renatofilho@520
    24
# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
renatofilho@520
    25
CFLAGS="$CFLAGS -Wall"
renatofilho@520
    26
AC_PROG_CC
renatofilho@520
    27
AC_PROG_LIBTOOL
renatofilho@520
    28
renatofilho@520
    29
# Checks for libraries.
renatofilho@520
    30
renatofilho@520
    31
# Checks for header files.
renatofilho@520
    32
AC_HEADER_STDC
renatofilho@520
    33
renatofilho@520
    34
#Test if --disable-debug given
renatofilho@520
    35
AC_ARG_ENABLE(debug,
renatofilho@520
    36
	AC_HELP_STRING([--disable-debug], [enable debugging mode]))
renatofilho@520
    37
if test x"$enable_debug" != xno; then
renatofilho@520
    38
    CFLAGS="$CFLAGS -g -DGMYTH_STREAM_USE_DEBUG"
renatofilho@520
    39
else
renatofilho@520
    40
    CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
renatofilho@520
    41
fi          
renatofilho@520
    42
renatofilho@520
    43
renatofilho@520
    44
# Checks required packages ####################################################
renatofilho@520
    45
###############################################################################
renatofilho@520
    46
renatofilho@520
    47
## Check for pkgconfig ########################################################
renatofilho@520
    48
###############################################################################
renatofilho@520
    49
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
renatofilho@520
    50
if test "x$HAVE_PKGCONFIG" = "xno"; then
renatofilho@520
    51
  AC_MSG_ERROR(you need to have pkgconfig installed !)
renatofilho@520
    52
fi
renatofilho@520
    53
renatofilho@520
    54
## Check for Glib2.0 ##########################################################
renatofilho@520
    55
###############################################################################
renatofilho@520
    56
PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
renatofilho@520
    57
if test "x$HAVE_GLIB" = "xno"; then
renatofilho@520
    58
  AC_MSG_ERROR(you need glib-2.0 installed)
renatofilho@520
    59
fi
renatofilho@520
    60
AC_SUBST(GLIB_CFLAGS)
renatofilho@520
    61
AC_SUBST(GLIB_LIBS)
renatofilho@520
    62
renatofilho@520
    63
AC_SUBST(CFLAGS)
renatofilho@520
    64
AC_SUBST(LDFLAGS)
renatofilho@520
    65
AC_SUBST(LIBS)
renatofilho@520
    66
renatofilho@520
    67
AC_OUTPUT([
renatofilho@520
    68
Makefile
renatofilho@520
    69
gmyth-stream-client.pc
renatofilho@520
    70
src/Makefile
renatofilho@520
    71
test/Makefile
renatofilho@520
    72
])
renatofilho@520
    73
renatofilho@520
    74
if test "x$enable_debug" != "xno"; then
renatofilho@520
    75
    AC_MSG_NOTICE([Debug: Enabled])
renatofilho@520
    76
else
renatofilho@520
    77
    AC_MSG_NOTICE([Debug: Disabled])
renatofilho@520
    78
fi          
renatofilho@520
    79