Commit 951d2f87 authored by daniel_e's avatar daniel_e
Browse files

Use quadrigraphs to output characters like [ ]. Add error checking at the

* macros/cxx.m4: Use quadrigraphs to output characters like [ ].
* macros/pcre.m4: Add error checking at the autoconf level.
parent 31a7128c
2002-11-20 Daniel Elstner <daniel.elstner@gmx.net>
* macros/cxx.m4: Use quadrigraphs to output characters like [ ].
* macros/pcre.m4: Add error checking at the autoconf level.
2002-11-19 Daniel Elstner <daniel.elstner@gmx.net>
* src/aboutdialog.cc: Set the default response.
......
......@@ -44,7 +44,7 @@ AC_CACHE_CHECK(
if test "x$regexxer_cv_cxx_has_std_locale" = xyes; then
{
AC_DEFINE([REGEXXER_HAVE_STD_LOCALE], [1], [Define if the C++ library supports std::locale.])
AC_DEFINE([REGEXXER_HAVE_STD_LOCALE], [1], [Define to 1 if the C++ library supports std::locale.])
}
fi
])
......@@ -60,8 +60,8 @@ AC_DEFUN([REGEXXER_ARG_ENABLE_WARNINGS],
AC_REQUIRE([AC_PROG_CXX])
AC_ARG_ENABLE([warnings], AC_HELP_STRING(
[--enable-warnings=none|minimum|maximum|hardcore],
[Control compiler pickyness. [[default=minimum]]]),
[--enable-warnings=@<:@none|minimum|maximum|hardcore@:>@],
[Control compiler pickyness. @<:@default=minimum@:>@]),
[regexxer_enable_warnings=$enableval],
[regexxer_enable_warnings=minimum])
......
......@@ -26,6 +26,8 @@
##
AC_DEFUN([PCRE_CHECK_VERSION],
[
m4_if([$1],, [AC_FATAL([argument required])])
AC_ARG_VAR([PCRE_CONFIG], [path to pcre-config script])
AC_PATH_PROG([PCRE_CONFIG], [pcre-config], [not found])
......@@ -41,7 +43,7 @@ fi
AC_MSG_CHECKING([[for libpcre >= ]$1])
pcre_version=`$PCRE_CONFIG --version`
pcre_version_ok=no
expr "$pcre_version" '>=' "[$1]" >/dev/null 2>&1 && pcre_version_ok=yes
expr "$pcre_version" '>=' "[$1]" >/dev/null 2>&5 && pcre_version_ok=yes
AC_MSG_RESULT([${pcre_version_ok}])
if test "x$pcre_version_ok" = xno; then
......@@ -72,6 +74,8 @@ AC_SUBST([PCRE_LIBS])
##
AC_DEFUN([PCRE_CHECK_UTF8],
[
AC_REQUIRE([PCRE_CHECK_VERSION])
AC_MSG_CHECKING([whether libpcre was compiled with UTF-8 support])
AC_LANG_PUSH(C)
pcre_saved_CFLAGS=$CFLAGS
......@@ -87,13 +91,13 @@ AC_TRY_RUN(
int main(int argc, char** argv)
{
const char* errptr = NULL;
const char* errmessage = NULL;
int erroffset = 0;
if(pcre_compile(".", PCRE_UTF8, &errptr, &erroffset, NULL))
if(pcre_compile(".", PCRE_UTF8, &errmessage, &erroffset, NULL))
exit(0);
fprintf(stderr, "%s\n", errptr);
fprintf(stderr, "%s\n", errmessage);
exit(1);
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment