summaryrefslogtreecommitdiff
blob: 6a3f165bb71a63aa80d0ab31e141cdc9c37bbe19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Make sure linking against included readline always works.

http://bugs.gentoo.org/100138

--- configure
+++ configure
@@ -477,8 +477,8 @@
 #define READLINE 1
 _ACEOF
 
-	READLINE_LIB=-lreadline
 	if test "$opt_with_installed_readline" != "no" ; then
+		READLINE_LIB=-lreadline
 		case "$opt_with_installed_readline" in
 		yes)	RL_INCLUDE= ;;
 		*)	case "$RL_INCLUDEDIR" in
@@ -490,6 +490,7 @@
 		READLINE_DEP=
 	else
 		RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+		READLINE_LIB='$(RL_LIBDIR)/libreadline.a'
 		READLINE_DEP='$(READLINE_LIBRARY)'
 	fi
 else
@@ -503,8 +504,8 @@
 _ACEOF
 
 	fi
-	HISTORY_LIB=-lhistory
  	if test "$opt_with_installed_readline" != "no"; then
+		HISTORY_LIB=-lhistory
 		HIST_LIBDIR=$RL_LIBDIR
 		HISTORY_DEP=
 		case "$opt_with_installed_readline" in
@@ -517,6 +518,7 @@
 		esac
 	else
 		HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+		HISTORY_LIB='$(HIST_LIBDIR)/libhistory.a'
 		HISTORY_DEP='$(HISTORY_LIBRARY)'
 	fi
 else