PACKAGE=opus
VERSION=$OPUS_VERSION
-# For config.h.
+# For autoconf
AC_SUBST(OPUS_VERSION)
+# For config.h.
+AC_DEFINE_UNQUOTED([OPUS_VERSION], ["$OPUS_VERSION"],
+ [Opus library version string])
+
# For libtool.
dnl Please update these for releases.
OPUS_LT_CURRENT=2
ac_enable_fixed="no";
ac_enable_float="yes";
-AC_ARG_ENABLE(fixed-point, [ --enable-fixed-point compile without floating point],
+AC_ARG_ENABLE(fixed-point, [ --enable-fixed-point compile without floating point (for machines without a fast enough FPU)],
[if test "$enableval" = yes; then
ac_enable_fixed="yes";
ac_enable_float="no";
- AC_DEFINE([FIXED_POINT], [1], [Compile as fixed-point])
-else
- AC_DEFINE([FLOATING_POINT], , [Compile as floating-point])
-fi],
-AC_DEFINE([FLOATING_POINT], , [Compile as floating-point]))
+ AC_DEFINE([FIXED_POINT], [1], [Compile as fixed-point (for machines without a fast enough FPU)])
+fi])
ac_enable_fixed_debug="no"
AC_ARG_ENABLE(fixed-point-debug, [ --enable-fixed-point-debug debug fixed-point implementation],
CFLAGS="$saved_CFLAGS $SYMBOL_VISIBILITY"
AC_SUBST(SYMBOL_VISIBILITY)
-ac_build_stack_protector=no
-if test "x$ac_cv_c_compiler_gnu" = "xyes" && test "x$MINGW32" != "xyes" ; then
-AC_ARG_ENABLE(stack-protector,
- AS_HELP_STRING([--disable-stack-protector],[Disable compiler stack hardening]),
- [
- if test "x$enableval" = "xno"; then
- ac_build_stack_protector=$enableval
- fi
- ], [
- ac_build_stack_protector=yes
- ])
-if test "x$ac_build_stack_protector" = "xyes"; then
-if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
-saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fstack-protector-all"
-AC_MSG_CHECKING([if ${CC} supports -fstack-protector-all])
-AC_LINK_IFELSE([AC_LANG_SOURCE([void main(void){char foo;}])],
- [ AC_MSG_RESULT([yes])
- STACK_PROTECTOR="-fstack-protector-all" ],
- AC_MSG_RESULT([no]))
-CFLAGS="$saved_CFLAGS $STACK_PROTECTOR"
-fi
-fi
-fi
-
CFLAGS="$CFLAGS -W"
saved_CFLAGS="$CFLAGS"
AM_CONDITIONAL([FIXED_POINT], [test x$ac_enable_fixed = xyes])
AM_CONDITIONAL([CUSTOM_MODES], [test x$ac_enable_custom_modes = xyes])
-AC_OUTPUT([Makefile opus.pc opus-uninstalled.pc
- doc/Makefile doc/Doxyfile])
+dnl subsitutions for the pkg-config files
+if test x$ac_enable_float = xyes; then
+ PC_BUILD="floating-point"
+ PC_LIBM=$LIBM
+else
+ PC_BUILD="fixed-point"
+ PC_LIBM=
+fi
+dnl opus_custom requires libm as well
+if test x$ac_enable_custom_modes = xyes; then
+ PC_BUILD="${PC_BUILD}, custom modes"
+ PC_LIBM=$LIBM
+fi
+AC_SUBST([PC_BUILD])
+AC_SUBST([PC_LIBM])
+
+
+AC_CONFIG_FILES([Makefile opus.pc opus-uninstalled.pc
+ doc/Makefile doc/Doxyfile])
+
+AC_OUTPUT
AC_MSG_RESULT([
------------------------------------------------------------------------