1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
AC_INIT(src/sidtune.cpp)
AC_CONFIG_AUX_DIR(scripts)
AM_INIT_AUTOMAKE(libsidplay, 1.36.59)
LIBVERSION=1:3:0
AC_SUBST(LIBVERSION)dnl libtool-style version
AC_CANONICAL_HOST
AC_PREFIX_DEFAULT(/usr)
AC_PROG_CXX
AC_LANG_CPLUSPLUS
dnl Check whether the compiler has bool.
SID_CHECK_BOOL
dnl Check for nothrow allocator.
SID_CHECK_EXCEPTIONS
dnl Check whether ios::binary is ios::bin.
SID_CHECK_IOS_BIN
AC_C_BIGENDIAN
if test $ac_cv_c_bigendian = yes; then
SID_SUBST(SID_WORDS_ENDIANESS,SID_WORDS_BIGENDIAN)
else
SID_SUBST(SID_WORDS_ENDIANESS,SID_WORDS_LITTLEENDIAN)
fi
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short int)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long int)
dnl SID_SUBST(SID_SIZEOF_CHAR,$ac_cv_sizeof_char)
dnl SID_SUBST(SID_SIZEOF_SHORT_INT,$ac_cv_sizeof_short_int)
dnl SID_SUBST(SID_SIZEOF_INT,$ac_cv_sizeof_int)
dnl SID_SUBST(SID_SIZEOF_LONG_INT,$ac_cv_sizeof_long_int)
if test $ac_cv_sizeof_long_int -lt 4; then
AC_MSG_ERROR([platform unsupported: sizeof(long int) < 4]);
fi
AC_HEADER_STDC
AC_CHECK_FUNC(strncasecmp,[SID_SUBST_DEF(SID_HAVE_STRNCASECMP)],
[SID_SUBST_UNDEF(SID_HAVE_STRNCASECMP)])
AC_CHECK_FUNC(strnicmp,[SID_SUBST_DEF(SID_HAVE_STRNICMP)],
[SID_SUBST_UNDEF(SID_HAVE_STRNICMP)])
AC_CHECK_FUNC(stricmp,[SID_SUBST_DEF(SID_HAVE_STRICMP)],
[SID_SUBST_UNDEF(SID_HAVE_STRICMP)])
AC_CHECK_FUNC(strcasecmp,[SID_SUBST_DEF(SID_HAVE_STRCASECMP)],
[SID_SUBST_UNDEF(SID_HAVE_STRCASECMP)])
AC_CHECK_HEADER(unistd.h,[SID_SUBST_DEF(SID_HAVE_UNISTD_H)],
[SID_SUBST_UNDEF(SID_HAVE_UNISTD_H)])
AC_CHECK_HEADER(sys/stat.h,[SID_SUBST_DEF(SID_HAVE_SYS_STAT_H)],
[SID_SUBST_UNDEF(SID_HAVE_SYS_STAT_H)])
AC_CHECK_HEADER(sys/types.h,[SID_SUBST_DEF(SID_HAVE_SYS_TYPES_H)],
[SID_SUBST_UNDEF(SID_HAVE_SYS_TYPES_H)])
AC_CHECK_HEADER(sstream,[SID_SUBST_DEF(SID_HAVE_SSTREAM)],
[SID_SUBST_UNDEF(SID_HAVE_SSTREAM)])
AC_SYS_LONG_FILE_NAMES
if test $ac_cv_sys_long_file_names = yes; then
SID_SUBST_DEF(SID_HAVE_LONG_FILE_NAMES)
else
SID_SUBST_UNDEF(SID_HAVE_LONG_FILE_NAMES)
fi
dnl Initialize libtool.
dnl AM_DISABLE_STATIC
AM_PROG_LIBTOOL
dnl SID_PROG_LIBTOOL
AC_SUBST(CXXFLAGS)
AC_ARG_ENABLE(optfixpoint,[ --enable-optfixpoint whether to optimize fixed-point calculations])
if test "$enable_optfixpoint" = yes; then
SID_SUBST_DEF(DIRECT_FIXPOINT)
AC_MSG_WARN([DIRECT_FIXPOINT enabled.])
else
SID_SUBST_UNDEF(DIRECT_FIXPOINT)
fi
AC_ARG_ENABLE(optendian,[ --enable-optendian whether to optimize big/little-endian conversion])
if test "$enable_optendian" = yes; then
SID_SUBST_DEF(OPTIMIZE_ENDIAN_ACCESS)
AC_MSG_WARN([OPTIMIZE_ENDIAN_ACCESS enabled.])
else
SID_SUBST_UNDEF(OPTIMIZE_ENDIAN_ACCESS)
fi
AC_OUTPUT(Makefile src/compconf.h src/libcfg.h src/Makefile)
|