renatofilho@520: # -*- Autoconf -*- renatofilho@520: # Process this file with autoconf to produce a configure script. renatofilho@520: renatofilho@520: AC_PREREQ(2.50) renatofilho@520: renatofilho@520: AC_INIT([gmyth-stream],[0.1]) renatofilho@520: renatofilho@520: AC_CONFIG_MACRO_DIR([m4]) renatofilho@520: AC_CONFIG_HEADER(config.h) renatofilho@520: renatofilho@520: AS_VERSION(gmyth-stream, GMYTH_STREAM, 0, 1, 0, 0, GMYTH_STREAM_SVN="no", GMYTH_STREAM_SVN="yes") renatofilho@520: GMYTH_STREAM_MAJORMINOR=$GMYTH_STREAM_MAJOR_VERSION.$GMYTH_STREAM_MINOR_VERSION renatofilho@520: AC_SUBST(GMYTH_STREAM_MAJORMINOR) renatofilho@520: renatofilho@520: dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode renatofilho@520: AM_MAINTAINER_MODE renatofilho@520: dnl make aclocal work in maintainer mode renatofilho@520: AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") renatofilho@520: renatofilho@520: AM_INIT_AUTOMAKE($PACKAGE, $VERSION) renatofilho@520: renatofilho@520: # Checks for programs. renatofilho@520: # check for tools renatofilho@520: # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g renatofilho@520: CFLAGS="$CFLAGS -Wall" renatofilho@520: AC_PROG_CC renatofilho@520: AC_PROG_LIBTOOL renatofilho@520: renatofilho@520: # Checks for libraries. renatofilho@520: renatofilho@520: # Checks for header files. renatofilho@520: AC_HEADER_STDC renatofilho@520: renatofilho@520: #Test if --disable-debug given renatofilho@520: AC_ARG_ENABLE(debug, renatofilho@520: AC_HELP_STRING([--disable-debug], [enable debugging mode])) renatofilho@520: if test x"$enable_debug" != xno; then renatofilho@520: CFLAGS="$CFLAGS -g -DGMYTH_STREAM_USE_DEBUG" renatofilho@520: else renatofilho@520: CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS" renatofilho@520: fi renatofilho@520: renatofilho@520: renatofilho@520: # Checks required packages #################################################### renatofilho@520: ############################################################################### renatofilho@520: renatofilho@520: ## Check for pkgconfig ######################################################## renatofilho@520: ############################################################################### renatofilho@520: AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) renatofilho@520: if test "x$HAVE_PKGCONFIG" = "xno"; then renatofilho@520: AC_MSG_ERROR(you need to have pkgconfig installed !) renatofilho@520: fi renatofilho@520: renatofilho@520: ## Check for Glib2.0 ########################################################## renatofilho@520: ############################################################################### renatofilho@520: PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0, HAVE_GLIB=yes,HAVE_GLIB=no) renatofilho@520: if test "x$HAVE_GLIB" = "xno"; then renatofilho@520: AC_MSG_ERROR(you need glib-2.0 installed) renatofilho@520: fi renatofilho@520: AC_SUBST(GLIB_CFLAGS) renatofilho@520: AC_SUBST(GLIB_LIBS) renatofilho@520: renatofilho@520: AC_SUBST(CFLAGS) renatofilho@520: AC_SUBST(LDFLAGS) renatofilho@520: AC_SUBST(LIBS) renatofilho@520: renatofilho@520: AC_OUTPUT([ renatofilho@520: Makefile renatofilho@520: gmyth-stream-client.pc renatofilho@520: src/Makefile renatofilho@520: test/Makefile renatofilho@520: ]) renatofilho@520: renatofilho@520: if test "x$enable_debug" != "xno"; then renatofilho@520: AC_MSG_NOTICE([Debug: Enabled]) renatofilho@520: else renatofilho@520: AC_MSG_NOTICE([Debug: Disabled]) renatofilho@520: fi renatofilho@520: