Sorry if I missed this in the FAQ...Is there a simply way to specify more options to the gnu configure stage? I want to inform the configure program that some libs exists at a path such as "/usr/local/include" and "/usr/local/lib". Thank you! -az
Artie> Sorry if I missed this in the FAQ...Is there a simply way to Artie> specify more options to the gnu configure stage? I want to inform Artie> the configure program that some libs exists at a path such as Artie> "/usr/local/include" and "/usr/local/lib". Thank you! -az I think with most/all apps that use configure you can just set the LDFLAGS environment variable appropriately. For example, Python's configure --help output includes this near the end: Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor That said, I have no idea if the port command intercepts those settings in some way. -- Skip Montanaro - skip@pobox.com - http://www.webfast.com/~skip/ The major difference between Democrats and Republicans is that Republicans don't know that Randy Newman's lyrics are full of sarcasm.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 skip@pobox.com wrote: | Artie> Sorry if I missed this in the FAQ...Is there a simply way to | Artie> specify more options to the gnu configure stage? I want to inform | Artie> the configure program that some libs exists at a path such as | Artie> "/usr/local/include" and "/usr/local/lib". Thank you! -az | | I think with most/all apps that use configure you can just set the LDFLAGS | environment variable appropriately. For example, Python's configure - --help | output includes this near the end: | | Some influential environment variables: | CC C compiler command | CFLAGS C compiler flags | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | nonstandard directory <lib dir> | LIBS libraries to pass to the linker, e.g. -l<library> | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | you have headers in a nonstandard directory <include dir> | CPP C preprocessor | | That said, I have no idea if the port command intercepts those settings in | some way. According to man port at the very end it mentions that the file ${prefix}/etc/macports/macports.conf is one of the files loaded for configuration options. Looking through that file, at the very end of it, ~ there is a section for extra environment variables (such as those listed above) that are not removed from the environment during port's operation: - -------------- macports.conf section -------------- # Extra environment variables to keep. Any variables listed here are added # to the list of variables that are not removed from the environment used # while processing ports # extra_env KEEP_THIS THIS_TOO - ------------ end macports.conf section ------------ This would remain for all configuration options, but if you need to specify alternate library paths, then you might want to leave this in at all times. Otherwise, maybe a quit little script to modify the env variables in that file before building the files that need the altered environment variable would be in order. Matrix Mole -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHjodzNtosHRPp48MRAndiAKCb2I5NJh0SXPpLcMcyeXU8Z5af1wCffU2a lQMvu88ai4js+R5AkDBe6mQ= =yOzr -----END PGP SIGNATURE-----
On Jan 16, 2008, at 13:35, Artie Ziff wrote:
Sorry if I missed this in the FAQ...Is there a simply way to specify more options to the gnu configure stage? I want to inform the configure program that some libs exists at a path such as "/usr/local/include" and "/usr/local/lib". Thank you! -az
It is a specific goal of MacPorts NOT to use libraries or headers in other paths, especially not those in /usr/local. In fact, for proper operation of MacPorts, it is recommended that you do not have anything in /usr/local/include or /usr/local/lib.
participants (4)
-
Artie Ziff
-
Matrix Mole
-
Ryan Schmidt
-
skip@pobox.com