Re: getting the file extension of a shared object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux