build: ldflags conversion: libreadline.
[paraslash.git] / configure.ac
index d72b979..bbd0760 100644 (file)
@@ -1026,7 +1026,7 @@ if test "$have_curses" != "yes"; then
 fi
 
 if test "$have_readline" = "yes"; then
-       readline_libs="$readline_libs -lreadline"
+       readline_ldflags="$readline_libs -lreadline"
        AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
        if test "$have_readline" = "no"; then # try with -lcurses
                 # clear cache
@@ -1034,7 +1034,7 @@ if test "$have_readline" = "yes"; then
                 unset ac_cv_search_rl_free_keymap 2> /dev/null
                AC_SEARCH_LIBS([rl_free_keymap], [readline], [
                        have_readline=yes
-                       readline_libs="$readline_libs -lcurses"
+                       readline_ldflags="$readline_ldflags -lcurses"
                ], [], [-lcurses])
        fi
        if test "$have_readline" = "no"; then # try with -ltermcap
@@ -1043,19 +1043,17 @@ if test "$have_readline" = "yes"; then
                 unset ac_cv_search_rl_free_keymap 2> /dev/null
                AC_SEARCH_LIBS([rl_free_keymap], [readline], [
                        have_readline=yes
-                       readline_libs="$readline_libs -ltermcap"
+                       readline_ldflags="$readline_ldflags -ltermcap"
                ], [], [-ltermcap])
        fi
 fi
 
 if test "$have_readline" = "yes"; then
+       AC_SUBST(readline_cppflags)
+       AC_SUBST(readline_ldflags)
        client_errlist_objs="$client_errlist_objs interactive"
-       client_ldflags="$client_ldflags $readline_libs"
        audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
-       audioc_ldflags="$audioc_ldflags $readline_libs"
        play_errlist_objs="$play_errlist_objs interactive"
-       play_ldflags="$play_ldflags $readline_libs"
-       AC_SUBST(readline_cppflags)
        AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
 else
        AC_MSG_WARN([libreadline not found or unusable])