AC_INIT(configure.in) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(aacgain, 1.4) AC_LANG_CPLUSPLUS AC_PROG_CC AC_PROG_CXX AC_PROG_CPP AC_ARG_ENABLE(static_build, AC_HELP_STRING([--enable-static-build], [compile mp4v2 and faad2 from source and link everything statically]), [static_build=${enableval}], [static_build=yes]) AM_CONDITIONAL(do_static_build, test "$static_build" = "yes") AC_C_INLINE AC_C_CONST AC_PROG_INSTALL AC_PATH_XTRA AC_C_BIGENDIAN AC_HEADER_STDC AC_CHECK_HEADERS(stdint.h inttypes.h) AC_CHECK_HEADERS(mathf.h) AC_CHECK_HEADERS(float.h) AC_CHECK_FUNCS(strchr memcpy) AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(unsigned long long) AC_LANG_PUSH(C++) AC_CHECK_SIZEOF(bool) AC_LANG_POP(C++) AC_CHECK_MEMBERS(fpos_t.__pos,,, [#include ]) AC_CHECK_HEADERS(fcntl.h unistd.h stdint.h inttypes.h getopt.h byteswap.h) AC_CHECK_HEADERS(linux/cdrom.h sys/dvdio.h sys/time.h) AC_CHECK_FUNCS(strerror strcasestr poll getopt getopt_long getopt_long_only getrusage socketpair strsep inet_ntoa) AC_CHECK_TYPES([in_port_t, socklen_t], , , [#include #include #include ]) AC_CHECK_TYPES([uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t]) AH_VERBATIM([HAVE_UINT8_T], [/* add uint8_t type */ #undef HAVE_UINT8_T #ifndef HAVE_UINT8_T typedef unsigned char uint8_t; #endif]) AH_VERBATIM([HAVE_INT8_T], [/* add int8_t type */ #undef HAVE_INT8_T #ifndef HAVE_INT8_T typedef char int8_t; #endif]) AH_VERBATIM([HAVE_UINT16_T], [/* add uint16_t type */ #undef HAVE_UINT16_T #ifndef HAVE_UINT16_T typedef unsigned short uint16_t; #endif]) AH_VERBATIM([HAVE_INT16_T], [/* add int16_t type */ #undef HAVE_INT16_T #ifndef HAVE_INT16_T typedef short int16_t; #endif]) if test "$ac_cv_sizeof_unsigned_short" = "4"; then AC_DEFINE(A_UINT32_T,unsigned short) elif test "$ac_cv_sizeof_unsigned_int" = "4" then AC_DEFINE(A_UINT32_T,unsigned int) elif test "$ac_cv_sizeof_unsigned_long" = "4" then AC_DEFINE(A_UINT32_T,unsigned long) fi AH_VERBATIM([HAVE_UINT32_T], [/* add uint32_t type */ #undef HAVE_UINT32_T #ifndef HAVE_UINT32_T #undef A_UINT32_T typedef A_UINT32_T uint32_t; #endif]) if test "${ac_cv_sizeof_short}" = "4"; then AC_DEFINE(A_INT32_T,short) elif test "${ac_cv_sizeof_int}" = "4"; then AC_DEFINE(A_INT32_T,int) elif test "${ac_cv_sizeof_long}" = "4"; then AC_DEFINE(A_INT32_T,long) fi AH_VERBATIM([HAVE_INT32_T], [/* add int32_t type */ #undef HAVE_INT32_T #ifndef HAVE_INT32_T #undef A_INT32_T typedef A_INT32_T int32_t; #endif]) if test "${ac_cv_sizeof_unsigned_int}" = "8"; then AC_DEFINE(A_UINT64_T,unsigned int) elif test "${ac_cv_sizeof_unsigned_long}" = "8"; then AC_DEFINE(A_UINT64_T,unsigned long) elif test "${ac_cv_sizeof_unsigned_long_long}" = "8"; then AC_DEFINE(A_UINT64_T,unsigned long long) fi AH_VERBATIM([HAVE_UINT64_T], [/* add uint64_t type */ #undef HAVE_UINT64_T #ifndef HAVE_UINT64_T #undef A_UINT64_T typedef A_UINT64_T uint64_t; #endif]) if test "${ac_cv_sizeof_int}" = "8"; then AC_DEFINE(A_INT64_T,int) elif test "${ac_cv_sizeof_long}" = "8"; then AC_DEFINE(A_INT64_T,long) elif test "${ac_cv_sizeof_long_long}" = "8"; then AC_DEFINE(A_INT64_T,long long) fi AH_VERBATIM([HAVE_INT64_T], [/* add int64_t type */ #undef HAVE_INT64_T #ifndef HAVE_INT64_T #undef A_INT64_T typedef A_INT64_T int64_t; #endif]) AC_TYPE_SIZE_T AM_PROG_LIBTOOL AC_OUTPUT(Makefile aacgain/Makefile mp3gain/Makefile mp3gain/mpglibDBL/Makefile faad2/libfaad/Makefile mpeg4ip/lib/mp4v2/Makefile) ln -sf ../config.h faad2/config.h ln -sf ../config.h aacgain/config.h ln -sf config.h mpeg4ip_config.h