configure.ac 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # autoconf source script for generating configure
  2. AC_INIT([rnnoise-nu],[1.0],[gregor.richards@uwaterloo.ca])
  3. AC_CONFIG_SRCDIR([src/denoise.c])
  4. AC_CONFIG_AUX_DIR([scripts])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_USE_SYSTEM_EXTENSIONS
  7. AC_SYS_LARGEFILE
  8. m4_include([m4/lean.m4])
  9. AM_INIT_AUTOMAKE([1.11 foreign no-define dist-zip subdir-objects])
  10. AM_MAINTAINER_MODE([enable])
  11. AC_C_INLINE
  12. LT_INIT
  13. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  14. AC_DEFINE([RNNOISE_BUILD], [], [This is a build of the library])
  15. dnl Library versioning for libtool.
  16. dnl For some inane reason, in .so.major.minor.revision:
  17. dnl - major = CURRENT-AGE
  18. dnl - minor = AGE
  19. dnl - revision = REVISION
  20. OP_LT_CURRENT=1
  21. OP_LT_REVISION=0
  22. OP_LT_AGE=0
  23. AC_SUBST(OP_LT_CURRENT)
  24. AC_SUBST(OP_LT_REVISION)
  25. AC_SUBST(OP_LT_AGE)
  26. AC_ARG_ENABLE([assertions],
  27. AS_HELP_STRING([--enable-assertions], [Enable assertions in code]),,
  28. enable_assertions=no)
  29. AS_IF([test "$enable_assertions" = "yes"], [
  30. AC_DEFINE([OP_ENABLE_ASSERTIONS], [1], [Enable assertions in code])
  31. ])
  32. AC_ARG_ENABLE([examples],
  33. AS_HELP_STRING([--disable-examples], [Do not build example applications]),,
  34. enable_examples=yes)
  35. AM_CONDITIONAL([OP_ENABLE_EXAMPLES], [test "$enable_examples" = "yes"])
  36. AS_CASE(["$ac_cv_search_lrintf"],
  37. ["no"],[],
  38. ["none required"],[],
  39. [lrintf_lib="$ac_cv_search_lrintf"])
  40. LT_LIB_M
  41. AC_SUBST([lrintf_lib])
  42. CC_ATTRIBUTE_VISIBILITY([default], [
  43. CC_FLAG_VISIBILITY([CFLAGS="${CFLAGS} -fvisibility=hidden"])
  44. ])
  45. dnl Check for doxygen
  46. AC_ARG_ENABLE([doc],
  47. AS_HELP_STRING([--disable-doc], [Do not build API documentation]),,
  48. [enable_doc=yes]
  49. )
  50. AS_IF([test "$enable_doc" = "yes"], [
  51. AC_CHECK_PROG([HAVE_DOXYGEN], [doxygen], [yes], [no])
  52. AC_CHECK_PROG([HAVE_DOT], [dot], [yes], [no])
  53. ],[
  54. HAVE_DOXYGEN=no
  55. ])
  56. AM_CONDITIONAL([HAVE_DOXYGEN], [test "$HAVE_DOXYGEN" = "yes"])
  57. AC_CONFIG_FILES([
  58. Makefile
  59. rnnoise-nu.pc
  60. rnnoise-nu-uninstalled.pc
  61. doc/Doxyfile
  62. ])
  63. AC_CONFIG_HEADERS([config.h])
  64. AC_OUTPUT
  65. AC_MSG_NOTICE([
  66. ------------------------------------------------------------------------
  67. $PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK.
  68. Assertions ................... ${enable_assertions}
  69. Hidden visibility ............ ${cc_cv_flag_visibility}
  70. API code examples ............ ${enable_examples}
  71. API documentation ............ ${enable_doc}
  72. ------------------------------------------------------------------------
  73. ])