AC_DEFINE([_GNU_SOURCE], [1], [use GNU extensions if available])
AC_DEFINE([PATHSEP], ['/'], [define to path separator character])
AC_DEFINE([PATHSEPSTR], ["/"], [define to path separator as a string])
+AC_ARG_VAR([EDITOR],[default text editor])
+EDITOR="${EDITOR:-vi}"
+AC_DEFINE_UNQUOTED([EDITOR],["${EDITOR}"],[default text editor])
AC_CHECK_LIB([curl],[curl_easy_init])
AC_CHECK_LIB([expat],[XML_ParserCreate])
# Cygwin's iconv.h redirects to non-standard names, breaking the usual
#
# Options to configure. This can be overridden by the caller if necessary.
-CONFIGURE=--prefix=/usr --mandir=/usr/share/man
+CONFIGURE=--prefix=/usr --mandir=/usr/share/man EDITOR=editor
# Install commands. You wouldn't normally override these.
INSTALL=install
if(!editor)
editor = getenv("EDITOR");
if(!editor)
- editor = "vi"; // traditional fallback
+ editor = EDITOR;
ostringstream cmd;
cmd << editor << " " << tmpfile.path();
int rc = system(cmd.str().c_str());