TransWikia.com

How to portably set an environment variable in autotools / configure.ac?

Super User Asked by Tomasso on December 15, 2020

How can my configure.ac portably set an environment variable?

I want my configure script to set an environment variable. On linux and MacOS this would be:

export MYVAR=somevalue

On Windows it is (presumably, I don’t use Windows):

setx MYVAR "somevalue"

How to express this in the configure.ac script? Is there an AC_* macro that outputs the command for the current OS?

Thanks!

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP