I am on Darwin, where libtool sets shrext_cmds to `test .$module =
.yes && echo .so || echo .dylib`. In the project's configure.ac, there
is code that does this:

AC_DEFINE_UNQUOTED([SHARED_LIB_EXT],["${shrext_cmds}"],
                   [Extension of a shared library])dnl

This preprocessor macro, SHARED_LIB_EXT, then gets used in calls to
dlopen(), but unfortunately this leads to errors like this:

Impossible to load libscifunctions`test .$module = .yes && echo .so ||
echo .dylib` library:
dlopen(/Users/ericgallager/scilab/scilab/modules/functions/.libs/libscifunctions`test
.$module = .yes && echo .so || echo .dylib`, 10): image not found

As you can see, shrext_cmds have been passed as a string literal into
the code using it. Is there a way that I can get the variable to be
evaluated first before substituting it? i.e. I want the result of
running the command, not the literal string for the command itself.
Sorry if this is an extremely beginner-level question; all my
experience with shells and such is self-taught, and I never really
learned the basics properly.
Thanks,
Eric Gallager

Reply via email to