From: Harlan Stenn Date: Sat, 20 Oct 2007 22:30:10 +0000 (-0400) Subject: more cleanup to ntp_lineeditlibs.m4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e538cb120dde5a403949e5de69c42b7c42579656;p=thirdparty%2Fntp.git more cleanup to ntp_lineeditlibs.m4 bk: 471a8172zbuFs6xNsC1pAaWzU6Zx7g --- diff --git a/ChangeLog b/ChangeLog index 9ba5d118b3..c283e18a21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* more cleanup to ntp_lineeditlibs.m4. * Documentation updates from Dave Mills. * -ledit cleanup for ntpdc and ntpq. * Association and other cleanup from Dave Mills. diff --git a/m4/ntp_lineeditlibs.m4 b/m4/ntp_lineeditlibs.m4 index eedc9bf6ee..5b0873f778 100644 --- a/m4/ntp_lineeditlibs.m4 +++ b/m4/ntp_lineeditlibs.m4 @@ -8,48 +8,55 @@ AC_DEFUN([NTP_LINEEDITLIBS], [ [use_lineeditlibs="$withval"], [use_lineeditlibs="edit,editline"]) - for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do - for term_lib in "" termcap curses ncurses; do - case "$term_lib" in - '') TRY_LIB="-l$lineedit_lib" ;; - *) TRY_LIB="-l$lineedit_lib -l$term_lib" ;; - esac - LIBS="$ORIG_LIBS $TRY_LIB" - AC_MSG_CHECKING([for readline() with $TRY_LIB]) - AC_TRY_LINK_FUNC([readline], [ntp_cv_lib_lineedit="$TRY_LIB"]) - case "$ntp_cv_lib_lineedit" in - '') - AC_MSG_RESULT([no]) - ;; - *) # Use readline() - AC_MSG_RESULT([yes]) - break - ;; - esac - AC_MSG_CHECKING([for el_gets() with $TRY_LIB]) - AC_TRY_LINK_FUNC([el_gets], [ntp_cv_lib_lineedit="$TRY_LIB"]) - case "$ntp_cv_lib_lineedit" in + AC_MSG_CHECKING([line editing libraries]) + AC_MSG_RESULT([$use_lineeditlibs]) + case "$use_lineeditlibs" in + no) ntp_cv_lib_lineedit=no ;; + *) + for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do + for term_lib in "" termcap curses ncurses; do + case "$term_lib" in + '') TRY_LIB="-l$lineedit_lib" ;; + *) TRY_LIB="-l$lineedit_lib -l$term_lib" ;; + esac + LIBS="$ORIG_LIBS $TRY_LIB" + AC_MSG_CHECKING([for readline() with $TRY_LIB]) + AC_TRY_LINK_FUNC([readline], [ntp_cv_lib_lineedit="$TRY_LIB"]) + case "$ntp_cv_lib_lineedit" in + '') + AC_MSG_RESULT([no]) + ;; + *) # Use readline() + AC_MSG_RESULT([yes]) + break + ;; + esac + AC_MSG_CHECKING([for el_gets() with $TRY_LIB]) + AC_TRY_LINK_FUNC([el_gets], [ntp_cv_lib_lineedit="$TRY_LIB"]) + case "$ntp_cv_lib_lineedit" in + '') + AC_MSG_RESULT([no]) + ;; + *) # Use el_gets() + AC_MSG_RESULT([yes]) + break + ;; + esac + done + case "$ntp_cv_lib_lineedit" in + '') ;; + *) break ;; + esac + done + LIBS="$ORIG_LIBS" + case "$ntp_cv_lib_lineedit" in '') - AC_MSG_RESULT([no]) + ntp_cv_lib_lineedit="no" ;; - *) # Use el_gets() - AC_MSG_RESULT([yes]) - break + *) EDITLINE_LIBS="$ntp_cv_lib_lineedit" + AC_SUBST(EDITLINE_LIBS) ;; - esac - done - case "$ntp_cv_lib_lineedit" in - '') ;; - *) break ;; - esac - done - LIBS="$ORIG_LIBS" - case "$ntp_cv_lib_lineedit" in - '') - ntp_cv_lib_lineedit="no" - ;; - *) EDITLINE_LIBS="$ntp_cv_lib_lineedit" - AC_SUBST(EDITLINE_LIBS) + esac ;; esac ])