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

前端 未结 5 624
隐瞒了意图╮
隐瞒了意图╮ 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 06:04

    ifdef $(HAVE_CLIENT)
    libtest_LIBS = \
        $(top_builddir)/libclient.la
    else
    ifdef $(HAVE_SERVER)
    libtest_LIBS = \
        $(top_builddir)/libserver.la
    else
    libtest_LIBS = 
    endif
    endif
    

    NOTE: DO NOT indent the if then it don't work!

提交回复
热议问题