diff --git a/Makefile.am b/Makefile.am index 9cd0633dfaab7c7583043f96f4a051381321c601..e13c7cf401236512e2cb95615304fbf05a9a2b0c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ libopusfile_la_SOURCES = \ src/info.c \ src/internal.c src/internal.h \ src/opusfile.c src/stream.c -libopusfile_la_LIBADD = $(DEPS_LIBS) +libopusfile_la_LIBADD = $(DEPS_LIBS) $(lrintf_lib) libopusfile_la_LDFLAGS = -no-undefined \ -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@ diff --git a/configure.ac b/configure.ac index 04b69c3d4a895e8edc15038d7581a23c8cf935b0..e9e34313c9d5329c13618cf469409ecfdbb935ee 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,7 @@ m4_define([CURRENT_VERSION], AC_INIT([opusfile],[CURRENT_VERSION],[opus@xiph.org]) AC_CONFIG_SRCDIR([src/opusfile.c]) +AC_CONFIG_MACRO_DIR([m4]) AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE @@ -23,8 +24,6 @@ LT_INIT m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_CONFIG_MACRO_DIR([m4]) - dnl Library versioning for libtool. dnl Please update these for releases. dnl CURRENT, REVISION, AGE @@ -113,18 +112,22 @@ AS_IF([test "$enable_float" = "no"], AS_IF([test "$enable_fixed_point" = "yes"], [AC_DEFINE([OP_FIXED_POINT], [1], [Enable fixed-point calculation])], [dnl This only has to be tested for if float->fixed conversions are required + saved_LIBS="$LIBS" AC_SEARCH_LIBS([lrintf], [m], [ AC_DEFINE([OP_HAVE_LRINTF], [1], [Enable use of lrintf function]) lrintf_notice=" Library for lrintf() ......... ${ac_cv_search_lrintf}" ]) + LIBS="$saved_LIBS" ] ) -lrintf_lib="$ac_cv_search_lrintf" -AS_IF([test "$ac_cv_search_lrintf" = "none required"], - [lrintf_lib=""] -) -AC_SUBST(lrintf_lib) + +AS_CASE(["$ac_cv_search_lrintf"], + ["no"],[], + ["none required"],[], + [lrintf_lib="$ac_cv_search_lrintf"]) + +AC_SUBST([lrintf_lib]) CC_ATTRIBUTE_VISIBILITY([default], [ CC_FLAG_VISIBILITY([CFLAGS="${CFLAGS} -fvisibility=hidden"]) @@ -135,12 +138,14 @@ AC_ARG_ENABLE([doc], AS_HELP_STRING([--disable-doc], [Do not build API documentation]),, [enable_doc=yes] ) -AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, yes, no) -if test "$HAVE_DOXYGEN" != "yes" -o "$enable_doc" != "yes" ; then - HAVE_DOXYGEN="no" - enable_doc="no" -fi -AM_CONDITIONAL(HAVE_DOXYGEN, [test $HAVE_DOXYGEN = yes]) + +AS_IF([test "$enable_doc" = "yes"], [ + AC_CHECK_PROG([HAVE_DOXYGEN], [doxygen], [yes], [no]) +],[ + HAVE_DOXYGEN=no +]) + +AM_CONDITIONAL([HAVE_DOXYGEN], [test "$HAVE_DOXYGEN" = "yes"]) AC_CONFIG_FILES([ Makefile