Blame configure.ac

Packit 2af067
dnl Process this file with autoconf to produce a configure script.
Packit 2af067
AC_INIT(src/mpc_decoder.c)
Packit 2af067
AC_CONFIG_AUX_DIR(config)
Packit 2af067
AM_INIT_AUTOMAKE(libmpcdec,1.2.6)
Packit 2af067
AM_CONFIG_HEADER(include/config.h)
Packit 2af067
Packit 2af067
AM_PROG_LIBTOOL
Packit 2af067
Packit 2af067
CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fPIC"
Packit 2af067
Packit 2af067
AC_C_BIGENDIAN(,CFLAGS="$CFLAGS -DMPC_LITTLE_ENDIAN",)
Packit 2af067
Packit 2af067
AC_HEADER_STDC
Packit 2af067
AC_HEADER_STDBOOL
Packit 2af067
AC_C_CONST
Packit 2af067
AC_C_INLINE
Packit 2af067
AC_TYPE_OFF_T
Packit 2af067
AC_TYPE_SIZE_T
Packit 2af067
AC_TYPE_INT16_T
Packit 2af067
AC_TYPE_UINT16_T
Packit 2af067
AC_TYPE_INT32_T
Packit 2af067
AC_TYPE_UINT32_T
Packit 2af067
AC_TYPE_INT64_T
Packit 2af067
Packit 2af067
if test "x$ac_cv_header_inttypes_h" = "xyes" ; then
Packit 2af067
	INTTYPES_H="#include <inttypes.h>"
Packit 2af067
else
Packit 2af067
	INTTYPES_H=""
Packit 2af067
fi
Packit 2af067
Packit 2af067
if test "x$ac_cv_c_int16_t" = "xno" ; then
Packit 2af067
        AC_MSG_ERROR([No signed 16 bit type found on this platform.])
Packit 2af067
elif test "x$ac_cv_c_int16_t" = "xyes" ; then
Packit 2af067
	ac_cv_c_int16_t=int16_t
Packit 2af067
fi
Packit 2af067
Packit 2af067
if test "x$ac_cv_c_uint16_t" = "xno" ; then
Packit 2af067
        AC_MSG_ERROR([No unsigned 16 bit type found on this platform.])
Packit 2af067
elif test "x$ac_cv_c_uint16_t" = "xyes" ; then
Packit 2af067
	ac_cv_c_uint16_t=uint16_t
Packit 2af067
fi
Packit 2af067
Packit 2af067
if test "x$ac_cv_c_int32_t" = "xno" ; then
Packit 2af067
        AC_MSG_ERROR([No signed 32 bit type found on this platform.])
Packit 2af067
elif test "x$ac_cv_c_int32_t" = "xyes" ; then
Packit 2af067
	ac_cv_c_int32_t=int32_t
Packit 2af067
fi
Packit 2af067
Packit 2af067
if test "x$ac_cv_c_uint32_t" = "xno" ; then
Packit 2af067
        AC_MSG_ERROR([No unsigned 32 bit type found on this platform.])
Packit 2af067
elif test "x$ac_cv_c_uint32_t" = "xyes" ; then
Packit 2af067
	ac_cv_c_uint32_t=uint32_t
Packit 2af067
fi
Packit 2af067
Packit 2af067
if test "x$ac_cv_c_uint64_t" = "xno" ; then
Packit 2af067
        AC_MSG_ERROR([No signed 64 bit type found on this platform.])
Packit 2af067
elif test "x$ac_cv_c_int64_t" = "xyes" ; then
Packit 2af067
	ac_cv_c_int64_t=int64_t
Packit 2af067
fi
Packit 2af067
Packit 2af067
AC_FUNC_MEMCMP
Packit 2af067
if test "x$ac_cv_func_memcmp_working" = "xno" ; then
Packit 2af067
	AC_MSG_ERROR([working memcmp is not available.])
Packit 2af067
fi
Packit 2af067
Packit 2af067
AC_CHECK_FUNCS([memmove memset], [],
Packit 2af067
        AC_MSG_ERROR([memset or memmove is missing.]))
Packit 2af067
Packit 2af067
dnl Make substitutions
Packit 2af067
Packit 2af067
AC_SUBST(VERSION)
Packit 2af067
AC_SUBST(LIBTOOL_DEPS)
Packit 2af067
AC_SUBST(INTTYPES_H)
Packit 2af067
AC_SUBST(SIZE16, $ac_cv_c_int16_t)
Packit 2af067
AC_SUBST(USIZE16, $ac_cv_c_uint16_t)
Packit 2af067
AC_SUBST(SIZE32, $ac_cv_c_int32_t)
Packit 2af067
AC_SUBST(USIZE32, $ac_cv_c_uint32_t)
Packit 2af067
AC_SUBST(SIZE64, $ac_cv_c_int64_t)
Packit 2af067
AC_SUBST(OPT)
Packit 2af067
AC_SUBST(LIBS)
Packit 2af067
Packit 2af067
AC_OUTPUT(Makefile src/Makefile include/Makefile include/mpcdec/config_types.h)
Packit 2af067
AC_MSG_RESULT([=> libmpcdec $VERSION configured successfully])