Re: AC_LTDL_SHLIBEXT setting LT_MODULE_EXT with wrong extension on mac os x

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

 



Husam Senussi wrote:
> Hi,
> 
> Not sure if this question for autconf, but I'm using AC_LTDL_SHLIBEXT to
> set shard object
> extension but I end up with LT_MODULE_EXT set to ".so" in mac os x 
> instead of .dylib.
> 
> AC_PROG_LIBTOOL
> AC_LTDL_SHLIBEXT
> # Checks for libraries.


More appropriate for the libtool list, but that's ok.

Yes, well, .so is the right extension on Mac OS X for loadable modules.
.dylib is the right extension for shared libraries.

ltdl.m4 has:

# LT_SYS_MODULE_EXT
# -----------------
AC_DEFUN([LT_SYS_MODULE_EXT],
[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
AC_CACHE_CHECK([which extension is used for runtime loadable modules],
  [libltdl_cv_shlibext],
[
module=yes
eval libltdl_cv_shlibext=$shrext_cmds
  ])
if test -n "$libltdl_cv_shlibext"; then
  m4_pattern_allow([LT_MODULE_EXT])dnl
  AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
    [Define to the extension used for runtime loadable modules, say,
".so".])
fi
])# LT_SYS_MODULE_EXT

# Old name:
AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])

If you write your own macro, and put in:

module=no
eval my_shlibext=$shrext_cmds

or similar, then you will get the correct result.

Peter
-- 
Peter O'Gorman
http://pogma.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