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