[opus] [libopusfile PATCH] build: implement autotools build system for libopusfile.

Timothy B. Terriberry tterribe at xiph.org
Mon Sep 24 21:49:23 PDT 2012

Skipping running autoheader succeeds. This is a good start, but there are a number of issues.

--enable-http doesn't actually add -DOP_ENABLE_HTTP to the CFLAGS, so the actual http support doesn't get built.

The configure check for lrintf doesn't define -DOP_HAVE_LRINTF on success, so that doesn't actually get used, either.

make debug doesn't add -DOP_ENABLE_ASSERTIONS, so assertions aren't enabled. I think I'd also prefer to use $(filter-out) to remove -O from CFLAGS, instead of trying to override with -O0.

It would also be nice to get --enable-fixed-point (-DOP_FIXED_PINT) and --disable-float (-DOP_DISABLE_FLOAT_API, requires -DOP_FIXED_POINT, should disable linking with -lm for lrintf). I also find some kind of summary showing whether all of these options are enabled or disabled when configure is done to be extraordinarily useful (it lets users know both what the defaults are and what options are available in the first place, since the chances they'll run --help are slim).

The default CFLAGS should include
-std=c89 -pedantic -Wextra -Wno-parentheses -Wno-long-long -Wall

They should also include -fvisibility=hidden. Right now I believe you are exporting the internal library functions. Really, we should be doing this with a linker script, so we can build an export list for Windows from the same source, but adding the flag is the easiest thing to do for now.

More information about the opus mailing list