Re: db3 now in unstable
On Thu, Mar 15, 2001 at 11:05:35AM -0500, Ben Collins wrote:
> I just showed you. How difficult is that? Also, you don't even need to
> detect it in autoconf, you detect it in your code:
>
> #if DB_VERSION_MAJOR == 1
> ...
> #elif DB_VERSION_MAJOR == 2
> ...
> #elif DB_VERSION_MAJOR == 3
> ...
> #else
> #error Cannot determine db major version
> #endif
>
> Was that hard? Is it too complex? If you need to detect it in autoconf,
> compile this code and use it's output:
>
> #include <db.h>
> #include <stdio.h>
> int main() { printf("%d\n", DB_VERSION_MAJOR); exit(0); }
>
> Then use that output like this:
>
> db_ver=`./conftest`
> LIBS="$LIBS -ldb${db_ver}"
>
> Let's show some creativity here.
Gods, please don't - this is a really gratuitous use of compiled
binaries. You can, and should, do this sort of thing entirely with
preprocessing - there's examples all over autoconf.
--
Daniel Jacobowitz Debian GNU/Linux Developer
Monta Vista Software Debian Security Team
"I am croutons!"
Reply to: