diff --git a/Modules.cpp b/Modules.cpp index 36f36405..0b07f200 100644 --- a/Modules.cpp +++ b/Modules.cpp @@ -907,10 +907,11 @@ bool CModules::FindModPath(const CString& sModule, CString& sModPath, CModules::ModDirList CModules::GetModDirs() { ModDirList ret; + CString sDir; #ifdef RUN_FROM_SOURCE // ./modules - CString sDir = CZNC::Get().GetCurPath() + "/modules/"; + sDir = CZNC::Get().GetCurPath() + "/modules/"; ret.push(std::make_pair(sDir, sDir)); // ./modules/extra diff --git a/configure b/configure index 5e8e44ea..a3cdd155 100755 --- a/configure +++ b/configure @@ -2816,7 +2816,7 @@ fi # Check whether --enable-run-from-source was given. if test "${enable_run_from_source+set}" = set; then : - enableval=$enable_run_from_source; if test "x$withval" = "xyes" ; then + enableval=$enable_run_from_source; if test "x$enableval" = "xyes" ; then appendCXX -DRUN_FROM_SOURCE fi fi diff --git a/configure.in b/configure.in index 430db930..82542466 100644 --- a/configure.in +++ b/configure.in @@ -109,7 +109,7 @@ AC_ARG_ENABLE( [c-ares], [ARES="auto"]) AC_ARG_ENABLE( [run-from-source], AS_HELP_STRING([--enable-run-from-source], [znc will be runnable without installation]), - [if test "x$withval" = "xyes" ; then + [if test "x$enableval" = "xyes" ; then appendCXX -DRUN_FROM_SOURCE fi])