X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=configure;h=a4f2c486f4d4b37e9ac829d625e4e6f8ab6a5f33;hb=548845673bdbe52a3cb2d7c6c2818d3202fffcba;hp=2027320d579f66003b180e9c4f7809bb5d15d3ce;hpb=4501dbfd29a28bc5291e9ed7401a19b52b52861c;p=pkg%2Fabook.git diff --git a/configure b/configure index 2027320..a4f2c48 100755 --- a/configure +++ b/configure @@ -2296,15 +2296,199 @@ fi + + echo $ac_n "checking for a readline compatible library""... $ac_c" 1>&6 +echo "configure:2302: checking for a readline compatible library" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_readline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ORIG_LIBS=$LIBS + for readline_lib in readline edit editline; do + for termcap_lib in "" termcap curses ncurses; do + if test -z "$termcap_lib"; then + TRY_LIB="-l$readline_lib" + else + TRY_LIB="-l$readline_lib -l$termcap_lib" + fi + LIBS="$ORIG_LIBS $TRY_LIB" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_lib_readline="$TRY_LIB" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + if test -n "$ac_cv_lib_readline"; then + break + fi + done + if test -n "$ac_cv_lib_readline"; then + break + fi + done + if test -z "$ac_cv_lib_readline"; then + ac_cv_lib_readline="no" + LIBS=$ORIG_LIBS + fi + +fi + +echo "$ac_t""$ac_cv_lib_readline" 1>&6 + + if test "$ac_cv_lib_readline" != "no"; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBREADLINE 1 +EOF + + for ac_hdr in readline.h readline/readline.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2362: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking whether readline supports history""... $ac_c" 1>&6 +echo "configure:2399: checking whether readline supports history" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_readline_history'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + ac_cv_lib_readline_history="no" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_lib_readline_history="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_lib_readline_history" 1>&6 + if test "$ac_cv_lib_readline_history" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_READLINE_HISTORY 1 +EOF + + for ac_hdr in history.h readline/history.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2438: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + fi + fi + + +if test x$ac_lib_readline = xno -o x$ac_cv_lib_readline_history = xno; then + { echo "configure: error: *** readline library not found or it doesn't support history ***" 1>&2; exit 1; } +fi + +LDFLAGS="$ac_cv_lib_readline $LDFLAGS" + for ac_func in resizeterm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2303: checking for $ac_func" >&5 +echo "configure:2487: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2353,12 +2537,12 @@ done echo $ac_n "checking for snprintf""... $ac_c" 1>&6 -echo "configure:2357: checking for snprintf" >&5 +echo "configure:2541: checking for snprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_snprintf=yes" else @@ -2404,12 +2588,12 @@ else fi echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 -echo "configure:2408: checking for vsnprintf" >&5 +echo "configure:2592: checking for vsnprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vsnprintf=yes" else