summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac6
-rw-r--r--lib/sitecing_util.cc3
2 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 0da7658..b9e9b56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,50 +32,52 @@ PKG_CHECK_MODULES([KINGATE_FCGI],[kingate-fcgi],[
])
PKG_CHECK_MODULES([KINGATE_PLAINCGI],[kingate-plaincgi],[
HAVE_PLAINCGI=true
],[
AC_MSG_NOTICE([no plaincgi support in kingate library])
])
if ! (${HAVE_FCGI} || ${HAVE_PLAINCGI}) ; then
AC_MSG_ERROR([not a single CGI interface supported in kingate])
fi
AM_CONDITIONAL([HAVE_FCGI],[${HAVE_FCGI}])
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_LIB([dl],[dlopen],,[
- AC_MSG_ERROR([no dlopen 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
AC_WITH_DOT
else
AM_CONDITIONAL([HAVE_DOXYGEN],[false])
AM_CONDITIONAL([HAVE_DOT],[false])
fi
AC_CONFIG_FILES([
Makefile
Doxyfile
sitecing.pc
include/Makefile
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
@@ -239,40 +239,41 @@ namespace sitecing {
lsl = rv.length();
rv += '/';
rv += r.substr(0,sl);
r.erase(0,sl+1);
}
}
if(r.empty())
return rv+'/';
if(r.length()==2 && r[0]=='.' && r[0]=='.') {
if(lsl==string::npos) {
if(rv.empty() & (opts&fail_beyond_root))
throw utility_beyond_root(CODEPOINT,"went beyond root while combining path");
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...
}
}