AnswerBun.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!

Related Questions

Nvidia Docker VNC with OpenGl and virtual display

0  Asked on January 6, 2021 by johni07

       

Remove the backstage Office 2016 / O365 for business

1  Asked on January 5, 2021 by yetanotherrandomuser

 

Automatic sleep vs Manual sleep

0  Asked on January 4, 2021

   

priority of the Linux group & user

1  Asked on January 3, 2021 by jw__fu

 

Delete a corrupt file in Linux

8  Asked on January 3, 2021 by stig

   

How to change brightness in FreeBSD?

1  Asked on January 1, 2021 by pouriya

         

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP