bin_PROGRAMS = cycript
cycript_SOURCES = Console.cpp Display.cpp
-cycript_LDFLAGS = $(LTLIBAPR) -ldl
+cycript_LDFLAGS = $(LTLIBAPR) $(LTLIBREADLINE) $(LTLIBTERMCAP) -ldl
cycript_LDADD = libcycript.la
ldid = true
LTFLAGS
LTLIBICONV
LIBICONV
+LTLIBTERMCAP
+LTLIBREADLINE
CY_OBJECTIVEC_FALSE
CY_OBJECTIVEC_TRUE
GNUSTEP_CONFIG
+
+
+ cy_save=$LIBS
+ LIBS=
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a readline compatible library" >&5
$as_echo_n "checking for a readline compatible library... " >&6; }
if ${ax_cv_lib_readline+:} false; then :
fi
fi
-case $vl_cv_lib_readline in #(
+ LTLIBREADLINE=$LIBS
+ LIBS=$cy_save
+
+case $ax_cv_lib_readline in #(
no) :
as_fn_error $? "missing \"libreadline\"" "$LINENO" 5 ;; #(
*) :
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cur_term" >&5
+
+ cy_save=$LIBS
+ LIBS=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cur_term" >&5
$as_echo_n "checking for library containing cur_term... " >&6; }
if ${ac_cv_search_cur_term+:} false; then :
$as_echo_n "(cached) " >&6
fi
+ LTLIBTERMCAP=$LIBS
+ LIBS=$cy_save
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
AM_CONDITIONAL([CY_OBJECTIVEC], [test "x$CY_OBJECTIVEC" = x1])
-AX_LIB_READLINE
-AS_CASE([$vl_cv_lib_readline], [no], [AC_MSG_ERROR([missing "libreadline"])])
+AC_DEFUN([CY_LT_LIB], [
+ cy_save=$LIBS
+ LIBS=
+ ]$2[
+ ]$1[=$LIBS
+ LIBS=$cy_save
+ AC_SUBST(]$1[)
+])
+
+CY_LT_LIB([LTLIBREADLINE], [AX_LIB_READLINE])
+AS_CASE([$ax_cv_lib_readline], [no], [AC_MSG_ERROR([missing "libreadline"])])
dnl XXX: AX_LIB_READLINE totally lied: it was suposed to figure this out :(
-dnl XXX: this should only be linked into the main binary (not the library)
-AC_SEARCH_LIBS([cur_term], [termcap])
+CY_LT_LIB([LTLIBTERMCAP], [AC_SEARCH_LIBS([cur_term], [termcap])])
dnl XXX: saurik doesn't understand what this does
dnl AM_ICONV {{{