Re: getting the file extension of a shared object

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

 



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)

to perform configure-substitution on @SHREXT@ on AC_OUTPUT files.

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.

Fang


David Fang
http://www.csl.cornell.edu/~fang/
http://www.achronix.com/



_______________________________________________
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