bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] bash 2.05b: Installed readline headers inclusion


From: Maciej W. Rozycki
Subject: [patch] bash 2.05b: Installed readline headers inclusion
Date: Fri, 25 Oct 2002 23:25:56 +0200 (MET DST)

Hello,

 When cross-compiling bash, an incorrect path for headers is passed if the
system-installed readline is used and prefix is not /usr.  As a result,
wrong headers may be used.  It happens e.g. if bash is configured as
follows: 

$ CC=mipsel-linux-gcc CC_FOR_BUILD=i386-linux-gcc ./configure
--prefix=/usr/local --with-installed-readline --build=i386-linux
--host=mipsel-linux

Obviously readline is installed in the place it can be seen be seen by
mipsel-linux-gcc (e.g. /usr/mipsel-linux), yet "-I/usr/local/include" is
passed to it, even though the prefix, as specified as a configure option,
refers to the host system and not the build one. 

 Following is a patch that fixes the problem.  A readline include path is
never passed implicitly -- it's only passed if explicitly specified as a
value of the "--with-installed-readline" option.  There are no hardcoded
defaults.

2002-10-25  Maciej W. Rozycki  <address@hidden>

        * configure.in: Set RL_INCLUDE to empty unless an explicit path
        was given to --with-installed-readline.

 Please apply,

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: address@hidden, PGP key available        +

bash-2.05b-include.patch
diff -up --recursive --new-file bash-2.05b.macro/configure.in 
bash-2.05b/configure.in
--- bash-2.05b.macro/configure.in       2002-07-16 13:31:25.000000000 +0000
+++ bash-2.05b/configure.in     2002-10-18 16:28:24.000000000 +0000
@@ -442,9 +442,9 @@ if test $opt_readline = yes; then
        AC_DEFINE(READLINE)
        READLINE_LIB=-lreadline
        if test "$opt_with_installed_readline" != "no" ; then
-               case "$RL_INCLUDEDIR" in
-               /usr/include)   ;;
-               *)              RL_INCLUDE='-I${RL_INCLUDEDIR}'
+               case "$opt_with_installed_readline" in
+               yes)    RL_INCLUDE=;;
+               *)      RL_INCLUDE='-I${RL_INCLUDEDIR}'
                esac
                READLINE_DEP=
        else
@@ -466,9 +466,9 @@ if test $opt_history = yes || test $opt_
        if test "$opt_with_installed_readline" != "no"; then
                HIST_LIBDIR=$RL_LIBDIR
                HISTORY_DEP=
-               case "$RL_INCLUDEDIR" in
-               /usr/include)   ;;
-               *)              RL_INCLUDE='-I${RL_INCLUDEDIR}'
+               case "$opt_with_installed_readline" in
+               yes)    RL_INCLUDE=;;
+               *)      RL_INCLUDE='-I${RL_INCLUDEDIR}'
                esac
        else
                HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'







reply via email to

[Prev in Thread] Current Thread [Next in Thread]