From 1d887c9b5002d8e9a4e65c192c8a1b7355cc356a Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Thu, 20 Nov 2014 22:15:11 +0000 Subject: modules: fall-back to system dlopen search path. * m4/module.c (m4__module_open): If the module search function cannot find a matching module, fall-back to the system dlopen search path. Signed-off-by: Gary V. Vaughan --- m4/module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/m4/module.c b/m4/module.c index ac1b58c7..07e33519 100644 --- a/m4/module.c +++ b/m4/module.c @@ -273,6 +273,10 @@ m4__module_open (m4 *context, const char *name, m4_obstack *obs) char *filepath = m4_path_search (context, name, suffixes); void *handle = NULL; + /* Use system module search path if m4_path_search fails. */ + if (!filepath) + filepath = xstrdup (name); + if (filepath) { handle = dlopen (filepath, RTLD_NOW|RTLD_GLOBAL); -- cgit v1.2.1