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