I want to install Libav locally in a folder and for that I have to install yasm (I can disable the dependency but I don't want to just for the sake of the argument). The installation of the package is done in the terminal via "./configure" and "make" (when I run "./configure" I receive the message, that yasm is missing). How can I tell to "./configure" to take it's yasm dependencies from the path "./libs" (there is a folder with libraries in the parent folder). Should I modify the makefile (and if yes should I change only the LDflags? to what?) or add the " --extra-ldflags="-L./libs" " to the ./configure command? What would be the use of cflags here?
Asked
Active
Viewed 399 times
1
-
I can't quite tell exactly what you're doing but note it's a very bad idea to try to unpack two different packages into the same directory: you say that it should look in "./libs" which implies they're in the same directory. Anyway, you should run `configure --help` and see what options are available to allow it to find alternative locations for libraries etc. There may even be a specific option for locating `yasm`. You should _not_ edit the makefile, except for in the case of last resort, since your changes will just get overwritten again the next time you run `configure`. – MadScientist Jul 21 '19 at 17:10
1 Answers
1
To have autotools' configure
use dependencies from a specific directory, the following may or may not work, as the configure
script can be written differently:
--extra-ldflags
(there should be--extra-cflags
too) is fine, if it's there;- for library dependencies, you can add
CFLAGS="-I<path>" CXXFLAGS="<same>" LDFLAGS="-L<path>"
to./configure
's environment or to its command line arguments; - cleaner approach: if you have
pkg-config
configuration generated and installed for your dependencies, you can specify aPKG_CONFIG_PATH
instead. In special cases of cross-compilation, one can usePKG_CONFIG_SYSROOT_DIR
. - for local host executables, append/prepend to
PATH
.
Related question: https://unix.stackexchange.com/questions/19663/how-to-change-the-compiler-settings-with-automake

Victor Sergienko
- 13,115
- 3
- 57
- 91