xiph / vorbis

Reference implementation of the Ogg Vorbis audio format.
BSD 3-Clause "New" or "Revised" License
450 stars 183 forks source link

configure incoherency #59

Closed eblanca closed 4 years ago

eblanca commented 4 years ago

I'm building libvorbis on a platform without pkg-config, libogg is installed into /opt Now, when I run ./configure --with-ogg=/opt it completes successfully, as when I run ./configure --prefix=/opt libogg is found and this is odd. What I mean is, since --prefix tells configure the destination directory, I expect configure to fail, since in the second case I omitted the libogg needed directory. Instead, --prefix is wrongly used as search path for libogg. Does configure.ac need some tweaking ?

erikd commented 4 years ago

I think you misunderstand what those options do.

--with-ogg specifies where to find the libogg include files etc.

--prefix tells configure the root location where build products are to be installed.

eblanca commented 4 years ago

Oh, we absolutely agree about those.

I did run that second configure by mistake and it was successful! I'm wondering how can configure find libogg in that case? And why does it report -I/opt/include -L/opt/lib into config.log as searching paths for headers and libraries? This is an error, IMHO, as it is using that --prefix path as searching path when it is not.

erikd commented 4 years ago

Maybe /opt/ is one of the places that the autotools automatically checks.

eblanca commented 4 years ago

In that case, ./configure should be able to find libogg into /opt even with no parameters at all. This isn't the case.

erikd commented 4 years ago

Maybe if you specify --prefix=/opt that path is added to search path.

eblanca commented 4 years ago

Finally, you're right. In fact, when specifying both --with-ogg=/opt and --prefix=/usr/local on the command line, the script never searchs into /usr/local , as an actual search path has been provided with --with-ogg . It surely backs up to the path from --prefix when no other info gets provided. Thank you.

erikd commented 4 years ago

\o/

Maybe you can close this now :).