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