user1128797
user1128797

Reputation: 21

autotools finding correct library and function

I need to find in which of the libraries (lib1 lib2 lib3 etc,.) a function func() is defined and then also check the number of arguments this function accepts (func(1) or func(1,1)) etc..

How can i do this?

Upvotes: 1

Views: 205

Answers (1)

William Pursell
William Pursell

Reputation: 212228

You can use AC_SEARCH_LIBS do determine which library is the first to define the symbol, and you can use AC_LINK_IFELSE to check the argument count. Note that AC_TRY_LINK is obsolete and you should use AC_LINK_IFELSE instead.

Upvotes: 1

Related Questions