configure.in
上传用户:wstnjxml
上传日期:2014-04-03
资源大小:7248k
文件大小:4k
源码类别:

Windows CE

开发平台:

C/C++

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(src/mpc_decoder.c)
  3. AC_CONFIG_AUX_DIR(config)
  4. AM_INIT_AUTOMAKE(libmusepack,1.1.1)
  5. AM_CONFIG_HEADER(include/config.h)
  6. AM_PROG_LIBTOOL
  7. CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fPIC"
  8. AC_C_BIGENDIAN(,CFLAGS="$CFLAGS -DMPC_LITTLE_ENDIAN",)
  9. AC_HEADER_STDC
  10. AC_CHECK_HEADERS([inttypes.h string.h])
  11. AC_HEADER_STDBOOL
  12. AC_C_CONST
  13. AC_C_INLINE
  14. AC_TYPE_OFF_T
  15. AC_TYPE_SIZE_T
  16. AC_CHECK_TYPES([ptrdiff_t])
  17. AC_FUNC_MEMCMP
  18. AC_CHECK_FUNCS([memmove memset sqrt])
  19. AC_MSG_CHECKING(for int16_t)
  20. AC_CACHE_VAL(has_int16_t,
  21. [AC_TRY_RUN([
  22. int16_t foo;
  23. int main() {return 0;}
  24. ],
  25. has_int16_t=yes,
  26. has_int16_t=no,
  27. has_int16_t=no
  28. )])
  29. AC_MSG_RESULT($has_int16_t)
  30. AC_MSG_CHECKING(for int32_t)
  31. AC_CACHE_VAL(has_int32_t,
  32. [AC_TRY_RUN([
  33. int32_t foo;
  34. int main() {return 0;}
  35. ],
  36. has_int32_t=yes,
  37. has_int32_t=no,
  38. has_int32_t=no
  39. )])
  40. AC_MSG_RESULT($has_int32_t)
  41. AC_MSG_CHECKING(for uint32_t)
  42. AC_CACHE_VAL(has_uint32_t,
  43. [AC_TRY_RUN([
  44. uint32_t foo;
  45. int main() {return 0;}
  46. ],
  47. has_uint32_t=yes,
  48. has_uint32_t=no,
  49. has_uint32_t=no
  50. )])
  51. AC_MSG_RESULT($has_uint32_t)
  52. AC_MSG_CHECKING(for uint16_t)
  53. AC_CACHE_VAL(has_uint16_t,
  54. [AC_TRY_RUN([
  55. uint16_t foo;
  56. int main() {return 0;}
  57. ],
  58. has_uint16_t=yes,
  59. has_uint16_t=no,
  60. has_uint16_t=no
  61. )])
  62. AC_MSG_RESULT($has_uint16_t)
  63. AC_MSG_CHECKING(for u_int32_t)
  64. AC_CACHE_VAL(has_u_int32_t,
  65. [AC_TRY_RUN([
  66. u_int32_t foo;
  67. int main() {return 0;}
  68. ],
  69. has_u_int32_t=yes,
  70. has_u_int32_t=no,
  71. has_u_int32_t=no
  72. )])
  73. AC_MSG_RESULT($has_u_int32_t)
  74. AC_MSG_CHECKING(for u_int16_t)
  75. AC_CACHE_VAL(has_u_int16_t,
  76. [AC_TRY_RUN([
  77. u_int16_t foo;
  78. int main() {return 0;}
  79. ],
  80. has_u_int16_t=yes,
  81. has_u_int16_t=no,
  82. has_u_int16_t=no
  83. )])
  84. AC_MSG_RESULT($has_u_int16_t)
  85. AC_MSG_CHECKING(for int64_t)
  86. AC_CACHE_VAL(has_int64_t,
  87. [AC_TRY_RUN([
  88. int64_t foo;
  89. int main() {return 0;}
  90. ],
  91. has_int64_t=yes,
  92. has_int64_t=no,
  93. has_int64_t=no
  94. )])
  95. AC_MSG_RESULT($has_int64_t)
  96. AC_CHECK_SIZEOF(short)
  97. AC_CHECK_SIZEOF(int)
  98. AC_CHECK_SIZEOF(long)
  99. AC_CHECK_SIZEOF(long long)
  100. if test x$has_int16_t = "xyes" ; then
  101.         SIZE16="int16_t"
  102. else
  103.         case 2 in
  104.                 $ac_cv_sizeof_short) SIZE16="short";;
  105.                 $ac_cv_sizeof_int) SIZE16="int";;
  106.         esac
  107. fi
  108. if test x$has_int32_t = "xyes" ; then
  109.         SIZE32="int32_t"
  110. else
  111.         case 4 in
  112.                 $ac_cv_sizeof_short) SIZE32="short";;
  113.                 $ac_cv_sizeof_int) SIZE32="int";;
  114.                 $ac_cv_sizeof_long) SIZE32="long";;
  115.         esac
  116. fi
  117. if test x$has_uint32_t = "xyes" ; then
  118.         USIZE32="uint32_t"
  119. else
  120.         if test x$has_u_int32_t = "xyes" ; then
  121.                 USIZE32="u_int32_t"
  122.         else
  123.                 case 4 in
  124.                         $ac_cv_sizeof_short) USIZE32="unsigned short";;
  125.                         $ac_cv_sizeof_int) USIZE32="unsigned int";;
  126.                         $ac_cv_sizeof_long) USIZE32="unsigned long";;
  127.                 esac
  128.         fi
  129. fi
  130. if test x$has_uint16_t = "xyes" ; then
  131.         USIZE16="uint16_t"
  132. else
  133.         if test x$has_u_int16_t = "xyes" ; then
  134.                 USIZE16="u_int16_t"
  135.         else
  136.                 case 2 in
  137.                         $ac_cv_sizeof_short) USIZE16="unsigned short";;
  138.                         $ac_cv_sizeof_int) USIZE16="unsigned int";;
  139.                         $ac_cv_sizeof_long) USIZE16="unsigned long";;
  140.                 esac
  141.         fi
  142. fi
  143. if test x$has_int64_t = "xyes" ; then
  144.         SIZE64="int64_t"
  145. else
  146. case 8 in
  147.         $ac_cv_sizeof_int) SIZE64="int";;
  148.         $ac_cv_sizeof_long) SIZE64="long";;
  149.         $ac_cv_sizeof_long_long) SIZE64="long long";;
  150. esac
  151. fi
  152. if test -z "$SIZE16"; then
  153.         AC_MSG_ERROR(No 16 bit type found on this platform!)
  154. fi
  155. if test -z "$USIZE16"; then
  156.         AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
  157. fi
  158. if test -z "$SIZE32"; then
  159.         AC_MSG_ERROR(No 32 bit type found on this platform!)
  160. fi
  161. if test -z "$USIZE32"; then
  162.         AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
  163. fi
  164. if test -z "$SIZE64"; then
  165.         AC_MSG_WARN(No 64 bit type found on this platform!)
  166. fi
  167. dnl Make substitutions
  168. AC_SUBST(VERSION)
  169. AC_SUBST(LIBTOOL_DEPS)
  170. AC_SUBST(SIZE16)
  171. AC_SUBST(USIZE16)
  172. AC_SUBST(SIZE32)
  173. AC_SUBST(USIZE32)
  174. AC_SUBST(SIZE64)
  175. AC_SUBST(OPT)
  176. AC_SUBST(LIBS)
  177. AC_OUTPUT(Makefile src/Makefile include/Makefile include/musepack/config_types.h)
  178. AC_MSG_RESULT([ libmusepack $VERSION configured successfully.])