diff options
author | Gary V. Vaughan <gary@gnu.org> | 2014-11-26 16:04:45 +0000 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2014-11-26 16:04:45 +0000 |
commit | 0e0b031066a7974c19a48f87ff51fcb5c7502fce (patch) | |
tree | fb9511c583966c612766fb9c8e3255d6adda507e | |
parent | 3834539812ee0415494f2bfd1aa1d67745b1b293 (diff) | |
download | m4-0e0b031066a7974c19a48f87ff51fcb5c7502fce.tar.gz |
modules: use only host system module file extension in searches.
* configure.ac (SYS_SHREXT): Define to host system module file
extension.
* m4/module.c (suffixes), m4/path.c (FILE_SUFFIXES): Use it
instead of listing suffixes for all supported host systems.
Reported by Pavel Raiskup
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | m4/module.c | 2 | ||||
-rw-r--r-- | m4/path.c | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 8981e10e..04da7e96 100644 --- a/configure.ac +++ b/configure.ac @@ -182,6 +182,12 @@ esac LT_LIB_DLLOAD LT_SYS_SYMBOL_USCORE +save_module=$module; module=yes +mfour_shrext=`eval printf '%s' \"$shrext_cmds\"` +module=$save_module +AC_DEFINE_UNQUOTED([SYS_SHREXT], ["$mfour_shrext"], + [Define this to the system shared module file extension]) + if test yes = "$sys_symbol_underscore"; then AC_MSG_CHECKING([whether dlsym requires underscore prefixed symbols]) AC_CACHE_VAL([mfour_cv_sys_dlsym_uscore], [dnl @@ -196,10 +202,6 @@ int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; }] _M4_EOF - save_module=$module; module=yes - mfour_shrext=`eval printf '%s' \"$shrext_cmds\"` - module=$save_module - libobjs=conftest_loadme.$ac_objext; lib=conftest_loadme$mfour_shrext save_module_cmds=$module_cmds; module_cmds=`eval echo $module_cmds` test -n "$module_cmds" || module_cmds=`eval echo $archive_cmds` diff --git a/m4/module.c b/m4/module.c index 022ff2eb..82c87edc 100644 --- a/m4/module.c +++ b/m4/module.c @@ -278,7 +278,7 @@ compare_builtin_CB (const void *a, const void *b) m4_module * m4__module_open (m4 *context, const char *name, m4_obstack *obs) { - static const char * suffixes[] = { "", ".so", ".dll", NULL }; + static const char * suffixes[] = { "", SYS_SHREXT, NULL }; m4_module * module = NULL; assert (context); @@ -45,8 +45,7 @@ static const char *FILE_SUFFIXES[] = { "", ".m4f", ".m4", - ".so", - ".dll", + SYS_SHREXT, NULL }; |