Check for -lldap, yes, no need to worry about the SAME_CONNECTION define,
since the authldap code doesn't care. The files mysql/dbauthmysql.c OR
pgsql/dbauthpgsql.c would not be linked (depending upon which database you
have chosen), which clears the namespace to allow authldap.c in.

In the current setup, you have to recompile for your desired database.
*All* of the function names are the same between the mysql, pgsql, and
ldap authentication modules. It is only at link time that you can chose
which object you want! I think that we should certainly seek to remove
this limitation in the future, but that pretty much means dl() or its kin
and/or further abstraction between the function names, and the functions
which actually get called.

With the present code, this *should* work (commas for brevity):

gcc -o dbmail-whatever whatever.o config,list,foo.o  \
  mysql/dbmysql,search,msgbuf.o  pgsql/dbauthpgsql.o -lmysql -lpgsql

You might be a nut for doing it, but I can think of at least one really
good reason: you have an existing user authentication table/system in a
postgresql database, but you're a huge fan of innodb and can't imagine
storing your messablks anywhere else! (no, this isn't me, I have my
existing user authentication in LDAP :-P but I'm pushing for true
separation of message store and authentication, so it's apropos :-)

Aaron


On Tue, 18 Mar 2003, Jesse Norell wrote:

>
> Hello Aaron,
>
>   I think the "wizards" are more like "dabblers," truth be known. :)
> I can probably ask a few questions in the right direction .. as for
> implimentation, I don't know that I'll have time to look at it right
> now, due to other obligations.  But here goes:
>
>   If --with-auth=ldap is specified, what exactly needs checked
> and included?  Eg. check for libldap and -lldap if found?  Anything
> need #define'd or #undef'd (eg. DBMAIL_USE_SAME_CONNECTION) ?
>
>   Your second idea of ./configure --with-db=mysql --with-auth=pgsql
> would require extensive changes to function names, as both the mysql
> and pgsql functions are named identically, though I certainly agree
> it has merit for some people's needs.
>
> Jesse
>
>
> ---- Original Message ----
> From: Aaron Stone <dbmail@dbmail.org>
> To: dbmail@dbmail.org
> Subject: [Dbmail] Help with autoconf and authldap
> Sent: Mon, 17 Mar 2003 15:55:45 -0800 (PST)
>
> I'd like to ask the local autoconf wizards if they might be able to help
> my out to set up the necessary magic to allow a configure
> such as this one:
>
> ./configure --with-db=mysql --with-auth=ldap
>
> Another little gotcha is that the current two auth providers are named
> dbtype/dbauthdbtype.c which means that the paths and names can't be rules,
> they'd need to be fully specified, as the authldap module would probably
> just be in the dbmail root directory (unless there were an 'auth'
> directory added...) and called plain authldap.c (no 'db' prefix).
>
> I also don't suppose we might be doing this while we're at it...
>
> ./configure --with-db=mysql --with-auth=pgsql
>
> Since, well, it *should* work once you undef DBMAIL_USE_SAME_DB...
>
>
> Thanks,
> Aaron
>
> -- End Original Message --
>
>
> --
> Jesse Norell
> jesse (at) kci.net
> _______________________________________________
> Dbmail mailing list
> Dbmail@dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>

Reply via email to