Hey,

On Mon, 22 Jun 2009, David Fang wrote:

when a configure frile is created, shretx_cmds is defined to the file extension of a shared object, wrt the platform (.dll for windows, .so for unix, ...).

What I can do is AC_DEFINE a macro using $shrext_cmds and using that macro in my code.

Is there a better way to achieve that ?

AC_DEFINE works well for anything that preprocesses config.h.
You could also store the result like so:

SHREXT=$shrext_cmds
AC_SUBST(SHREXT)

ok. Then I prefer AC_DEFINE (as we already include config.h, no need to make a specific file just for what I want).

If using shrext_cmds is a good way, then it's fine for me. I was afraid that it was something to not use because the name could change in the future, or something like that.

As as a side question: are you trying to do something that libtool/libltdl could handle? libltdl's lt_dlopenext() loads modules given the base name without the file extension, which takes some pain out of portability.

libltdl is of no use for our purposes. Thanks anyway.

regards

Vincent Torri


_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to