How to portably set an environment variable in autotools /

Super User Asked by Tomasso on December 15, 2020

How can my 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 script? Is there an AC_* macro that outputs the command for the current OS?


Add your own answers!

Related Questions

Ask a Question

Get help from others!

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