-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | lib/sitecing_util.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0da7658..b9e9b56 100644 --- a/configure.ac +++ b/configure.ac @@ -44,27 +44,29 @@ AM_CONDITIONAL([HAVE_PLAINCGI],[${HAVE_PLAINCGI}]) PKG_CHECK_MODULES([DOTCONF],[dotconf],,[ AC_MSG_ERROR([no dotconf library found]) ]) AC_WITH_PCRE([ AC_WITH_PCREPP(,[ AC_MSG_ERROR([no pcre++ library found]) ]) ],[ AC_MSG_ERROR([no pcre library found]) ]) +AC_CHECK_FUNC([dlopen],,[ AC_CHECK_LIB([dl],[dlopen],,[ AC_MSG_ERROR([no dlopen library found]) ]) +]) AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) WANT_DOXYGEN="yes" AC_ARG_ENABLE([doxygen], AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), [ test "${enableval}" = "no" && WANT_DOXYGEN="no" ] ) if test "${WANT_DOXYGEN}" = "yes" ; then AC_WITH_DOXYGEN diff --git a/lib/sitecing_util.cc b/lib/sitecing_util.cc index 9b6c54e..5466b28 100644 --- a/lib/sitecing_util.cc +++ b/lib/sitecing_util.cc @@ -251,25 +251,26 @@ namespace sitecing { return "/"; }else{ rv.erase(lsl+1); return rv; } } rv += '/'; rv += r; return rv; } void auto_chdir::pushdir(const string& td,bool ap) { - char *tmp = get_current_dir_name(); + /* TODO: make use of fchdir(2) instead */ + char *tmp = getcwd(0,0); assert(tmp); saved_pwd = tmp; free(tmp); autopop=ap; if(chdir(td.c_str())) throw konforka::exception(CODEPOINT,"failed to chdir()"); } void auto_chdir::popdir() { autopop=false; if(chdir(saved_pwd.c_str())) throw konforka::exception(CODEPOINT,"failed to chdir()"); // XXX: or should it be thrown? after all we call it from destructor... |