How to write multiple conditions in Makefile.am with “else if”

前端 未结 5 527
隐瞒了意图╮
隐瞒了意图╮ 2021-02-02 05:29

I want to compile my project with autoconf/automake. There are 2 conditions defined in my configure.ac

AM_CONDITIONAL(HAVE_CLIENT, test $enable-client -eq 1)
AM_         


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 05:55

    As you've discovered, you can't do that. You can do:

    libtest_LIBS = 
    

    ...

    if HAVE_CLIENT
    libtest_LIBS += libclient.la
    endif
    
    if HAVE_SERVER
    libtest_LIBS += libserver.la
    endif
    

提交回复
热议问题