-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}]) | |||
44 | PKG_CHECK_MODULES([DOTCONF],[dotconf],,[ | 44 | PKG_CHECK_MODULES([DOTCONF],[dotconf],,[ |
45 | AC_MSG_ERROR([no dotconf library found]) | 45 | AC_MSG_ERROR([no dotconf library found]) |
46 | ]) | 46 | ]) |
47 | 47 | ||
48 | AC_WITH_PCRE([ | 48 | AC_WITH_PCRE([ |
49 | AC_WITH_PCREPP(,[ | 49 | AC_WITH_PCREPP(,[ |
50 | AC_MSG_ERROR([no pcre++ library found]) | 50 | AC_MSG_ERROR([no pcre++ library found]) |
51 | ]) | 51 | ]) |
52 | ],[ | 52 | ],[ |
53 | AC_MSG_ERROR([no pcre library found]) | 53 | AC_MSG_ERROR([no pcre library found]) |
54 | ]) | 54 | ]) |
55 | 55 | ||
56 | AC_CHECK_FUNC([dlopen],,[ | ||
56 | AC_CHECK_LIB([dl],[dlopen],,[ | 57 | AC_CHECK_LIB([dl],[dlopen],,[ |
57 | AC_MSG_ERROR([no dlopen library found]) | 58 | AC_MSG_ERROR([no dlopen library found]) |
58 | ]) | 59 | ]) |
60 | ]) | ||
59 | 61 | ||
60 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) | 62 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) |
61 | 63 | ||
62 | WANT_DOXYGEN="yes" | 64 | WANT_DOXYGEN="yes" |
63 | AC_ARG_ENABLE([doxygen], | 65 | AC_ARG_ENABLE([doxygen], |
64 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), | 66 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), |
65 | [ | 67 | [ |
66 | test "${enableval}" = "no" && WANT_DOXYGEN="no" | 68 | test "${enableval}" = "no" && WANT_DOXYGEN="no" |
67 | ] | 69 | ] |
68 | ) | 70 | ) |
69 | if test "${WANT_DOXYGEN}" = "yes" ; then | 71 | if test "${WANT_DOXYGEN}" = "yes" ; then |
70 | AC_WITH_DOXYGEN | 72 | 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 { | |||
251 | return "/"; | 251 | return "/"; |
252 | }else{ | 252 | }else{ |
253 | rv.erase(lsl+1); | 253 | rv.erase(lsl+1); |
254 | return rv; | 254 | return rv; |
255 | } | 255 | } |
256 | } | 256 | } |
257 | rv += '/'; | 257 | rv += '/'; |
258 | rv += r; | 258 | rv += r; |
259 | return rv; | 259 | return rv; |
260 | } | 260 | } |
261 | 261 | ||
262 | void auto_chdir::pushdir(const string& td,bool ap) { | 262 | void auto_chdir::pushdir(const string& td,bool ap) { |
263 | char *tmp = get_current_dir_name(); | 263 | /* TODO: make use of fchdir(2) instead */ |
264 | char *tmp = getcwd(0,0); | ||
264 | assert(tmp); | 265 | assert(tmp); |
265 | saved_pwd = tmp; | 266 | saved_pwd = tmp; |
266 | free(tmp); | 267 | free(tmp); |
267 | autopop=ap; | 268 | autopop=ap; |
268 | if(chdir(td.c_str())) | 269 | if(chdir(td.c_str())) |
269 | throw konforka::exception(CODEPOINT,"failed to chdir()"); | 270 | throw konforka::exception(CODEPOINT,"failed to chdir()"); |
270 | } | 271 | } |
271 | void auto_chdir::popdir() { | 272 | void auto_chdir::popdir() { |
272 | autopop=false; | 273 | autopop=false; |
273 | if(chdir(saved_pwd.c_str())) | 274 | if(chdir(saved_pwd.c_str())) |
274 | throw konforka::exception(CODEPOINT,"failed to chdir()"); | 275 | throw konforka::exception(CODEPOINT,"failed to chdir()"); |
275 | // XXX: or should it be thrown? after all we call it from destructor... | 276 | // XXX: or should it be thrown? after all we call it from destructor... |