Menu

Setting environment variables for LIBXML2

Nathan
2020-12-02
2020-12-10
  • Nathan

    Nathan - 2020-12-02

    I'm pretty darned green with -nix. Sorry.

    It took me all day to figure out two things:
    1. setting environment variables means putting the variable assignments into the command line, not modifying a file
    2. get the values for LIBXML2_CFLAGS and LIBXML2_LIBS from xml2-config --cflags and xml2-config --libs

    --libs returns a string with spaces, so putting that string in single quotes when running ./configure is what is expected, right? So ...

    ./configure --prefix=/usr --LIBXML2_CFLAGS='-I/usr/include/libxml2' --LIBXML2_LIBS='-lxml2 -lz -lpthread -licucore -lm'
    Right?

    Thank you.

     

    Last edit: Nathan 2020-12-02
  • Stephen Rhodes

    Stephen Rhodes - 2020-12-10

    Hi Nathan,

    Thank you so much for your comment. It looks like you are pretty close, so you have probably figured this out already, my apologies for the late response. I think what you are looking for is the

    ./configure CPPFLAGS="-I/usr/include/libxml2"
    

    setting for the build. You can also get a lot of information from the

    ./configure --help
    

    command which will give you information about the settings needed for the program.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.