nu774 / fdkaac

command line encoder frontend for libfdk-aac
Other
260 stars 58 forks source link

libfdk-aac detection improvements #60

Closed TurtleWilly closed 3 months ago

TurtleWilly commented 4 months ago

fdkaac's configure doesn't detect a installed libfdk-aac:

…
checking for endian.h... no
checking for byteswap.h... no
checking for fdk-aac/aacenc_lib.h... no
configure: error: libfdk-aac is required

Ideally it simply should utilize pkg-config for detection (the library installs a proper .pc file), e.g. on my system:

$ pkg-config --libs --cflags fdk-aac
-I/usr/local/silo/libfdk-aac/latest/include -L/usr/local/silo/libfdk-aac/latest/lib -lfdk-aac

Alternatively the generated configure script should have a --with-libfdk-aac=<dir> option for verbosity and an easy direct way to specify a custom location to the library and its required components.

As it is now I need to manually patch up CPPFLAGS/CFLAGS, LDFLAGS, and LIBS variables to make detection work.

nu774 commented 4 months ago

Thanks, fixed on 1.0.6.

TurtleWilly commented 4 months ago

I tested the changes and it seems to work perfectly. Awesome!

…
checking for endian.h... no
checking for byteswap.h... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for fdk-aac... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
…
…
$ otool -L fdkaac
fdkaac:
    /usr/local/silo/libiconv/latest/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
    /usr/local/silo/libfdk-aac/latest/lib/libfdk-aac.2.dylib (compatibility version 3.0.0, current version 3.3.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

Thanks for the quick support! 👍