From: Richard Kreckel Date: Fri, 11 May 2001 19:43:31 +0000 (+0000) Subject: - Renamed our detected libreadline version in order to avoid conflicts X-Git-Tag: release_0-8-3~3 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=ac8fc4a3eb27b8701ad8b5f5d56aa9c7636b0db8 - Renamed our detected libreadline version in order to avoid conflicts with Chat Rameys (still broken) macros and future CPP definitions in libreadline's headers. Oh what a pain in the ass! --- diff --git a/NEWS b/NEWS index f778271c..089e06c9 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ This file records noteworthy changes. -0.8.3 (10 May 2001) +0.8.3 (11 May 2001) * color and clifford classes are functional and documented. * New "spinidx" class for dotted/undotted indices. * Predefined spinor metric tensor (created by spinor_metric()). diff --git a/acconfig.h b/acconfig.h index cac25aca..c73dd6c1 100644 --- a/acconfig.h +++ b/acconfig.h @@ -26,12 +26,6 @@ /* GiNaC archive file version age. */ #undef ARCHIVE_AGE -/* Major version of libreadline. */ -#undef GINAC_RLVERSION_MAJOR - -/* Minor version of libreadline. */ -#undef GINAC_RLVERSION_MINOR - /* Leave that blank line there!! Autoheader needs it. If you're adding to this file, keep in mind: diff --git a/acinclude.m4 b/acinclude.m4 index 68f75b2f..12350184 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -10,7 +10,7 @@ dnl about compatiblilty (which is not so bad by itself) and at the same time dnl they don't export the version to the preprocessor so we could kluge around dnl incomatiblities. The only reliable way to figure out the version is by dnl checking the extern variable rl_library_version at runtime. &#@$%*! -AC_DEFUN(GINAC_RLVERSION, +AC_DEFUN(GINAC_LIB_READLINE_VERSION, [AC_CACHE_CHECK([for version of libreadline], ginac_cv_rlversion, [ AC_TRY_RUN([ #include @@ -26,10 +26,10 @@ main() exit(0); }], ginac_cv_rlversion=`cat 'conftest.out'`, ginac_cv_rlversion='unknown', ginac_cv_rlversion='4.2') if test "x${ginac_cv_rlversion}" != "xunknown"; then - RLVERSION_MAJOR=`echo ${ginac_cv_rlversion} | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\1/'` - AC_DEFINE_UNQUOTED(GINAC_RLVERSION_MAJOR, $RLVERSION_MAJOR) - RLVERSION_MINOR=`echo ${ginac_cv_rlversion} | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\2/'` - AC_DEFINE_UNQUOTED(GINAC_RLVERSION_MINOR, $RLVERSION_MINOR) + RL_VERSION_MAJOR=`echo ${ginac_cv_rlversion} | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\1/'` + AC_DEFINE_UNQUOTED(GINAC_RL_VERSION_MAJOR, $RL_VERSION_MAJOR, [Major version of installed readline library.]) + RL_VERSION_MINOR=`echo ${ginac_cv_rlversion} | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\2/'` + AC_DEFINE_UNQUOTED(GINAC_RL_VERSION_MINOR, $RL_VERSION_MINOR, [Minor version of installed readline library.]) else GINAC_WARNING([I could not run a test of libreadline (needed for building ginsh ginsh).]) fi diff --git a/configure.in b/configure.in index 3ac2f1e2..c4f45821 100644 --- a/configure.in +++ b/configure.in @@ -95,7 +95,7 @@ save_LIBS=$LIBS LIBS="$LIBTERMCAP $LIBS" AC_CHECK_LIB(readline, readline) if test "x${ac_cv_lib_readline_readline}" = "xyes"; then - GINAC_RLVERSION + GINAC_LIB_READLINE_VERSION else GINAC_WARNING([I could not find libreadline (needed by ginsh).]) fi diff --git a/ginsh/ginsh_parser.yy b/ginsh/ginsh_parser.yy index ee4e4360..3f862bda 100644 --- a/ginsh/ginsh_parser.yy +++ b/ginsh/ginsh_parser.yy @@ -44,7 +44,7 @@ // Original readline settings static int orig_completion_append_character; -#if (GINAC_RLVERSION_MAJOR < 4) || (GINAC_RLVERSION_MAJOR == 4 && GINAC_RLVERSION_MINOR < 2) +#if (GINAC_RL_VERSION_MAJOR < 4) || (GINAC_RL_VERSION_MAJOR == 4 && GINAC_RL_VERSION_MINOR < 2) static char *orig_basic_word_break_characters; #else static const char *orig_basic_word_break_characters; @@ -706,7 +706,7 @@ static char **fcn_completion(char *text, int start, int end) rl_completion_append_character = orig_completion_append_character; rl_basic_word_break_characters = orig_basic_word_break_characters; rl_completer_word_break_characters = rl_basic_word_break_characters; -#if (GINAC_RLVERSION_MAJOR < 4) || (GINAC_RLVERSION_MAJOR == 4 && GINAC_RLVERSION_MINOR < 2) +#if (GINAC_RL_VERSION_MAJOR < 4) || (GINAC_RL_VERSION_MAJOR == 4 && GINAC_RL_VERSION_MINOR < 2) return completion_matches(text, (CPFunction *)filename_completion_function); #else return rl_completion_matches(text, (CPFunction *)rl_filename_completion_function); @@ -716,7 +716,7 @@ static char **fcn_completion(char *text, int start, int end) rl_completion_append_character = '('; rl_basic_word_break_characters = " \t\n\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~"; rl_completer_word_break_characters = rl_basic_word_break_characters; -#if (GINAC_RLVERSION_MAJOR < 4) || (GINAC_RLVERSION_MAJOR == 4 && GINAC_RLVERSION_MINOR < 2) +#if (GINAC_RL_VERSION_MAJOR < 4) || (GINAC_RL_VERSION_MAJOR == 4 && GINAC_RL_VERSION_MINOR < 2) return completion_matches(text, (CPFunction *)fcn_generator); #else return rl_completion_matches(text, (CPFunction *)fcn_generator);