Skip to content

Commit

Permalink
adding for_autoconf() C function for autoconf AC_CHECK_LIB feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis committed Oct 15, 2024
1 parent 4576b3d commit 5c02446
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libdar/get_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,12 @@ namespace libdar


} // end of namespace

extern "C"
{
unsigned int for_autoconf(unsigned int x)
{
return x+1;
}
}

10 changes: 10 additions & 0 deletions src/libdar/get_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,14 @@ namespace libdar

} // end of namespace

extern "C"
{
/// in case you use autoconf AC_CHECK_LIB in your program to detect the availability of libdar

/// use AC_CHECK_LIB(dar, [for_autoconf], [], [])
/// to have autoconf based configure script properly detecting
/// the presence and usability of libthreadar
extern unsigned int for_autoconf(unsigned int x);
}

#endif

0 comments on commit 5c02446

Please sign in to comment.