# Process this file with autoconf to produce a configure script.
AC_INIT(include/softmpeg.h)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
SOFTMPEG_MAJOR_VERSION=0
SOFTMPEG_MINOR_VERSION=1
SOFTMPEG_VERSION=$SOFTMPEG_MAJOR_VERSION.$SOFTMPEG_MINOR_VERSION
AC_SUBST(SOFTMPEG_MINOR_VERSION)
AC_SUBST(SOFTMPEG_MAJOR_VERSION)
AC_SUBST(SOFTMPEG_VERSION)
# For automake.
PACKAGE=libsoftmpeg
VERSION=$SOFTMPEG_VERSION
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
# Specify a configuration file
AM_CONFIG_HEADER(config.h)
dnl Initialize CC
AC_PROG_CC
AM_CONDITIONAL(CROSS_COMPILING,test "$cross_compiling" = "yes")
dnl Initialize libtool
AM_PROG_LIBTOOL
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
# Build time sanity check...
AM_SANITY_CHECK
# Checks for programs.
AC_ISC_POSIX
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.20)
PKG_CHECK_MODULES(FUSIONSOUND, fusionsound >= 0.9.20)
if test "x$enable_static" = xyes; then
FUSIONSOUND_MODULE="-L`$PKG_CONFIG --variable=moduledir directfb-internal`/interfaces/IFusionSound -lifusionsound -Wl,-uIFusionSound_default"
fi
AC_SUBST(FUSIONSOUND_MODULE)
have_avcodec=no
AC_CHECK_LIB(avcodec, avcodec_decode_video, [
AC_CHECK_HEADER(ffmpeg/avcodec.h, have_avcodec=yes,
AC_MSG_WARN([*** libavcodec header not found])) ],
AC_MSG_WARN([*** libavcodec not found]))
if test "$have_avcodec" = "yes"; then
AC_DEFINE(HAVE_AVCODEC, 1, [Define to 1 if libavcodec is available.])
AVCODEC_LIBS=-lavcodec
fi
AC_SUBST(AVCODEC_LIBS)
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
enable_debug="yes", enable_debug="no")
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE(ENABLE_DEBUG, 1,
[Define to 1 to enable debug.])
fi
AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
## build pthread compatible binaries
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
# Checks for header files.
AC_HEADER_STDC
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_OUTPUT([
Makefile
src/Makefile
include/Makefile
demo/Makefile
softmpeg.pc
])
LinuxTV legacy CVS <linuxtv.org/cvs>