Skip to content
Snippets Groups Projects
Commit b393cad4 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

fix for --without-dynamic-modules

Rev: lib/master.pike:1.30
Rev: src/configure.in:1.57
parent a2a9089e
No related branches found
No related tags found
No related merge requests found
...@@ -208,8 +208,13 @@ class dirnode ...@@ -208,8 +208,13 @@ class dirnode
object|program `[](string index) object|program `[](string index)
{ {
index=dirname+"/"+index; index=dirname+"/"+index;
return if(object o=((object)"/master")->findmodule(index))
((object)"/master")->findmodule(index) || (program) index; {
if(mixed tmp=o->_module_value)
return tmp;
return o;
}
return (program) index;
} }
}; };
...@@ -225,7 +230,7 @@ class mergenode ...@@ -225,7 +230,7 @@ class mergenode
} }
}; };
object low_findmodule(string fullname) object findmodule(string fullname)
{ {
mixed *stat; mixed *stat;
program p; program p;
...@@ -249,25 +254,13 @@ object low_findmodule(string fullname) ...@@ -249,25 +254,13 @@ object low_findmodule(string fullname)
if(mixed *stat=file_stat(fullname)) if(mixed *stat=file_stat(fullname))
{ {
if(stat[1]==-2) if(stat[1]==-2)
return low_findmodule(fullname+"/module"); return findmodule(fullname+"/module");
} }
#endif #endif
return UNDEFINED; return UNDEFINED;
} }
mixed findmodule(string path)
{
if(object o=low_findmodule(path))
{
if(mixed tmp=o->_module_value)
{
return tmp;
}
}
return o;
}
varargs mixed resolv(string identifier, string current_file) varargs mixed resolv(string identifier, string current_file)
{ {
mixed ret; mixed ret;
...@@ -278,19 +271,30 @@ varargs mixed resolv(string identifier, string current_file) ...@@ -278,19 +271,30 @@ varargs mixed resolv(string identifier, string current_file)
tmp=current_file/"/"; tmp=current_file/"/";
tmp[-1]=identifier; tmp[-1]=identifier;
path=combine_path(getcwd(), tmp*"/"); path=combine_path(getcwd(), tmp*"/");
if(ret=findmodule(path)) return ret; ret=findmodule(path);
} }
if(!ret)
{
foreach(pike_module_path, path) foreach(pike_module_path, path)
{ {
path=combine_path(path,identifier); path=combine_path(path,identifier);
if(ret=findmodule(path)) return ret; if(ret=findmodule(path)) break;
}
} }
if(!ret)
{
string path=combine_path(pike_library_path+"/modules",identifier); string path=combine_path(pike_library_path+"/modules",identifier);
if(ret=findmodule(path)) return ret; if(!(ret=findmodule(path)))
ret=_static_modules[identifier];
}
if(ret=_static_modules[identifier]) return ret; if(ret)
{
if(mixed tmp=ret->_module_value) return tmp;
return ret;
}
return UNDEFINED; return UNDEFINED;
} }
......
AC_REVISION("$Id: configure.in,v 1.56 1997/02/07 00:54:36 hubbe Exp $") AC_REVISION("$Id: configure.in,v 1.57 1997/02/20 00:04:59 hubbe Exp $")
AC_INIT(interpret.c) AC_INIT(interpret.c)
AC_CONFIG_HEADER(machine.h) AC_CONFIG_HEADER(machine.h)
...@@ -427,26 +427,6 @@ if test "${pike_cv_sys_os}" = "Linux"; then ...@@ -427,26 +427,6 @@ if test "${pike_cv_sys_os}" = "Linux"; then
AC_MSG_WARN(I will compensate for this by adding -lc -lm) AC_MSG_WARN(I will compensate for this by adding -lc -lm)
LIBS="${LIBS} -lc -lm" LIBS="${LIBS} -lc -lm"
fi fi
#if 0
if test $ldflags_is_set ; then
AC_MSG_CHECKING(for -rdynamic)
AC_CACHE_VAL(pike_cv_ld_accepts_rdynamic,
[
OLD_LDFLAGS="$LDFLAGS"
LDFLAGS="$LFFLAGS -rdynamic"
AC_TRY_LINK([],[ exit(0); ],[
pike_cv_ld_accepts_rdynamic=yes
],[ pike_cv_ld_accepts_rdynamic=no ])
LDFLAGS="$OLD_LDFLAGS"
])
AC_MSG_RESULT($pike_cv_ld_accepts_rdynamic)
if test x$pike_cv_ld_accepts_rdynamic = xyes ; then
LDFLAGS="$LDFLAGS -rdynamic"
fi
fi
#endif
fi fi
######################################################################## ########################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment