2
0

configure.in 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. dnl Process this file with autoconf to produce a configure script
  2. dnl ------------------------------------------------
  3. dnl Initialization and Versioning
  4. dnl ------------------------------------------------
  5. AC_INIT(mdct.c)
  6. AC_CANONICAL_HOST
  7. AC_CANONICAL_TARGET
  8. AM_CONFIG_HEADER([config.h])
  9. AM_INIT_AUTOMAKE(libvorbisidec,1.2.1)
  10. dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
  11. AM_MAINTAINER_MODE
  12. dnl Library versioning
  13. V_LIB_CURRENT=1
  14. V_LIB_REVISION=3
  15. V_LIB_AGE=0
  16. AC_SUBST(V_LIB_CURRENT)
  17. AC_SUBST(V_LIB_REVISION)
  18. AC_SUBST(V_LIB_AGE)
  19. dnl --------------------------------------------------
  20. dnl Check for programs
  21. dnl --------------------------------------------------
  22. dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
  23. dnl if $CFLAGS is blank
  24. cflags_save="$CFLAGS"
  25. AC_PROG_CC
  26. AC_PROG_CPP
  27. CFLAGS="$cflags_save"
  28. AM_PROG_LIBTOOL
  29. dnl --------------------------------------------------
  30. dnl Set build flags based on environment
  31. dnl --------------------------------------------------
  32. dnl Set some target options
  33. cflags_save="$CFLAGS"
  34. ldflags_save="$LDFLAGS"
  35. if test -z "$GCC"; then
  36. case $host in
  37. arm-*-*)
  38. DEBUG="-g -D_ARM_ASSEM_"
  39. CFLAGS="-O -D_ARM_ASSEM_"
  40. PROFILE="-p -g -O -D_ARM_ASSEM" ;;
  41. *)
  42. DEBUG="-g"
  43. CFLAGS="-O"
  44. PROFILE="-g -p" ;;
  45. esac
  46. else
  47. case $host in
  48. arm-*-*)
  49. DEBUG="-g -Wall -W -D__NO_MATH_INLINES -fsigned-char -D_ARM_ASSEM_"
  50. CFLAGS="-O2 -Wall -D_ARM_ASSEM_ -fsigned-char"
  51. PROFILE="-Wall -pg -g -O2 -D_ARM_ASSEM_ -fsigned-char -fno-inline-functions";;
  52. *)
  53. DEBUG="-g -Wall -W -D__NO_MATH_INLINES -fsigned-char"
  54. CFLAGS="-O2 -Wall -fsigned-char"
  55. PROFILE="-Wall -pg -g -O2 -fsigned-char -fno-inline-functions";;
  56. esac
  57. fi
  58. CFLAGS="$CFLAGS $cflags_save -D_REENTRANT"
  59. LDFLAGS="$LDFLAGS $ldflags_save"
  60. # Test whenever ld supports -version-script
  61. AC_PROG_LD
  62. AC_PROG_LD_GNU
  63. if test "x$lt_cv_prog_gnu_ld" = "xyes"; then
  64. SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
  65. LDFLAGS="$LDFLAGS $SHLIB_VERSION_ARG"
  66. fi
  67. dnl --------------------------------------------------
  68. dnl Options
  69. dnl --------------------------------------------------
  70. AC_ARG_ENABLE(
  71. low-accuracy,
  72. [ --enable-low-accuracy enable 32 bit only multiply operations],
  73. CFLAGS="$CFLAGS -D_LOW_ACCURACY_"
  74. )
  75. AC_ARG_ENABLE(
  76. 64kHz-limit,
  77. [ --enable-64kHz-limit limit playback ability to <64kHz files],
  78. CFLAGS="$CFLAGS -DLIMIT_TO_64kHz"
  79. )
  80. dnl --------------------------------------------------
  81. dnl Check for headers
  82. dnl --------------------------------------------------
  83. AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:)
  84. dnl --------------------------------------------------
  85. dnl Check for typedefs, structures, etc
  86. dnl --------------------------------------------------
  87. dnl none
  88. dnl --------------------------------------------------
  89. dnl Check for library functions
  90. dnl --------------------------------------------------
  91. AC_FUNC_ALLOCA
  92. AC_FUNC_MEMCMP
  93. dnl --------------------------------------------------
  94. dnl Do substitutions
  95. dnl --------------------------------------------------
  96. LIBS="$LIBS"
  97. AC_SUBST(LIBS)
  98. AC_SUBST(DEBUG)
  99. AC_SUBST(PROFILE)
  100. AC_OUTPUT(Makefile Version_script vorbisidec.pc)