@@ -191,6 +191,16 @@ echo " "
191191bool" Do you wish the psql program to use the GNU readline library?" " n"
192192if [" $ans " = " y" ]; then
193193echo >> Makefile.custom" USE_READLINE= true"
194+ echo >> Makefile.custom" READLINE_INC+= -DHAVE_LIBREADLINE"
195+ echo >> Makefile.custom" # Remove the following line if you don't have <readline.h>"
196+ echo >> Makefile.custom" READLINE_INC+= -DHAVE_READLINE_H"
197+ echo >> Makefile.custom" # Remove the following line if you don't have <history.h>"
198+ echo >> Makefile.custom" READLINE_INC+= -DHAVE_HISTORY"
199+ echo " "
200+ echo " NOTE! Makefile.custom assumes you have <readline.h> and either"
201+ echo " <history.h> or <readline/history.h>. If you do not have these,"
202+ echo " please edit Makefile.custom and remove the appropriate line(s)"
203+ echo " (they are indicated in the file)."
194204
195205echo " "
196206echo " If the include files for any of the following libraries are"
@@ -202,7 +212,7 @@ if [ "$ans" = "y" ] ; then
202212# ## Readline library ###
203213 def=$incdir
204214 readln" Readline include directory [$def ]" " $def "
205- echo >> Makefile.custom" READLINE_INC= -I$ans "
215+ echo >> Makefile.custom" READLINE_INC+ = -I$ans "
206216
207217 rldirdef=$libdir
208218 readln" Readline library directory [$rldirdef ]" " $rldirdef "
@@ -212,7 +222,7 @@ if [ "$ans" = "y" ] ; then
212222 readln" Name of the readline library [$rllibdef ]" " $rllibdef "
213223 rllib=$ans
214224
215- echo >> Makefile.custom" READLINE_LIB= -L$rldir -l$rllib "
225+ echo >> Makefile.custom" READLINE_LIB+ = -L$rldir -l$rllib "
216226
217227# ## Curses library ###
218228 crdirdef=$libdir
@@ -230,7 +240,8 @@ if [ "$ans" = "y" ] ; then
230240if [" $ans " != " n" ]; then
231241 def=" $incdir -I$incdir /readline"
232242 readln" History include directory [$def ]" " $def "
233- echo >> Makefile.custom" HISTORY_INC= -I$ans "
243+ echo >> Makefile.custom" READLINE_INC+= -DHAVE_LIBHISTORY"
244+ echo >> Makefile.custom" READLINE_INC+= -I$ans "
234245
235246 histdirdef=" $libdir "
236247 readln" History library directory [$histdirdef ]" " $histdirdef "
@@ -240,7 +251,7 @@ if [ "$ans" = "y" ] ; then
240251 readln" Name of the history library [$histlibdef ]" " $histlibdef "
241252 histlib=$ans
242253
243- echo >> Makefile.custom" HISTORY_LIB = -L$histdir -l$histlib "
254+ echo >> Makefile.custom" READLINE_LIB+ = -L$histdir -l$histlib "
244255fi
245256fi
246257
@@ -256,7 +267,7 @@ if [ "$ans" != "DEFAULT" ] ; then
256267fi
257268
258269echo " "
259- echo " You may choose to switchof assert checking. This will speed the"
270+ echo " You may choose to switchoff assert checking. This will speed the"
260271echo " program up, but may miss some potentially fatal bugs!"
261272bool" Switch off assert checking" " n"
262273if [" $ans " = " y" ]; then