www.pudn.com > mpeg2win-0.4-source.zip > configure.in
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
AC_INIT(src/mpeg2dec.c)
AC_CONFIG_AUX_DIR(autotools)
AM_INIT_AUTOMAKE(mpeg2dec,0.2.0)
AM_CONFIG_HEADER(include/config.h)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
dnl Checks for compiler
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
dnl GCC-specific flags
if test x"$GCC" = x"yes"; then
dnl -Wall -Werror moved to the end to not disturb the configure script
dnl -O3
changequote(<<,>>)
OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g;"`
changequote([,])
OPT_CFLAGS="$OPT_CFLAGS -O3"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
dnl -fomit-frame-pointer
OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
dnl arch-specific flags
case "$host_alias" in
i?86-* | k?-*)
AC_DEFINE([ARCH_X86],,[x86 architecture])
case "$host_alias" in
i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
esac
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
sparc-*)
OPT_CFLAGS="$CFLAGS -mcpu=ultrasparc -mvis"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
mips-sgi-irix6.*) dnl do we need to be that specific ?
OPT_CFLAGS="$CFLAGS -mabi=64"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
esac
else
dnl non-gcc flags - we probably need exact configuration triplets here.
case "$host_alias" in
mips-sgi-irix6.*)
OPT_CFLAGS="$CFLAGS -64"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
sparc-sun-solaris*)
OPT_CFLAGS="$CFLAGS -xCC -fast -xO5"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
esac
fi
dnl Checks for libtool - this must be done after we set cflags
AM_DISABLE_SHARED
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl Checks for libraries.
dnl Checks for header files.
INCLUDES='-I$(top_srcdir)/include -I$(top_builddir)/include'
AC_SUBST(INCLUDES)
AC_CHECK_GENERATE_INTTYPES(include)
AC_CHECK_HEADERS(getopt.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_C_BIGENDIAN
dnl Checks for library functions.
AC_CHECK_FUNCS([memalign])
AC_TYPE_SIGNAL
builtin([include],[libmpeg2/configure.incl])
builtin([include],[libvo/configure.incl])
AC_ARG_ENABLE([warnings],
[ --enable-warnings treat warnings as errors])
if test x"$enable_warnings" = x"yes" -a x"$GCC" = x"yes"; then
dnl compiler warnings
OPT_CFLAGS="$CFLAGS -Wall -Werror"
AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
fi
AC_C_ATTRIBUTE_ALIGNED
AC_OUTPUT(Makefile autotools/Makefile include/Makefile test/Makefile doc/Makefile src/Makefile libmpeg2/Makefile libvo/Makefile)