]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/aclocal.m4
ncurses 5.9 - patch 20130209
[ncurses.git] / test / aclocal.m4
index 33028da063db1c3fcd9465fb5594d0334b2e10d6..5954529bd424710caf6ceb35753041544b6e970d 100644 (file)
@@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written       *
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl $Id: aclocal.m4,v 1.84 2012/10/27 17:20:04 tom Exp $
+dnl $Id: aclocal.m4,v 1.85 2013/02/09 22:36:13 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -646,7 +646,7 @@ fi
 AC_CHECK_HEADERS($cf_cv_ncurses_header)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48
+dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50
 dnl --------------
 dnl Look for the curses libraries.  Older curses implementations may require
 dnl termcap/termlib to be linked as well.  Call CF_CURSES_CPPFLAGS first.
@@ -683,7 +683,7 @@ hpux10.*) #(vi
                        ac_cv_func_initscr=yes
                        ])])
        fi
-    ;;
+       ;;
 linux*)
        case `arch 2>/dev/null` in
        x86_64)
@@ -698,7 +698,7 @@ linux*)
                CF_ADD_LIBDIR(/lib)
                ;;
        esac
-    ;;
+       ;;
 sunos3*|sunos4*)
        if test "x$cf_cv_screen" = "xcurses_5lib"
        then
@@ -712,59 +712,63 @@ sunos3*|sunos4*)
 esac
 
 if test ".$ac_cv_func_initscr" != .yes ; then
-    cf_save_LIBS="$LIBS"
-    cf_term_lib=""
-    cf_curs_lib=""
+       cf_save_LIBS="$LIBS"
 
-    if test ".${cf_cv_ncurses_version:-no}" != .no
-    then
-        cf_check_list="ncurses curses cursesX"
-    else
-        cf_check_list="cursesX curses ncurses"
-    fi
+       if test ".${cf_cv_ncurses_version:-no}" != .no
+       then
+               cf_check_list="ncurses curses cursesX"
+       else
+               cf_check_list="cursesX curses ncurses"
+       fi
 
-    # Check for library containing tgoto.  Do this before curses library
-    # because it may be needed to link the test-case for initscr.
-    AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
-        for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
-        do
-            AC_CHECK_LIB($cf_term_lib,tgoto,[break])
-        done
-    ])
+       # Check for library containing tgoto.  Do this before curses library
+       # because it may be needed to link the test-case for initscr.
+       if test "x$cf_term_lib" = x
+       then
+               AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
+                       for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
+                       do
+                               AC_CHECK_LIB($cf_term_lib,tgoto,[break])
+                       done
+               ])
+       fi
 
-    # Check for library containing initscr
-    test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
-       for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
-    do
-        AC_CHECK_LIB($cf_curs_lib,initscr,[break])
-    done
-    test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
-
-    LIBS="-l$cf_curs_lib $cf_save_LIBS"
-    if test "$cf_term_lib" = unknown ; then
-        AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
-        AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
-            [initscr()],
-            [cf_result=yes],
-            [cf_result=no])
-        AC_MSG_RESULT($cf_result)
-        test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
-    elif test "$cf_curs_lib" = "$cf_term_lib" ; then
-        :
-    elif test "$cf_term_lib" != predefined ; then
-        AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
-        AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
-            [initscr(); tgoto((char *)0, 0, 0);],
-            [cf_result=no],
-            [
-            LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
-            AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
-                [initscr()],
-                [cf_result=yes],
-                [cf_result=error])
-            ])
-        AC_MSG_RESULT($cf_result)
-    fi
+       # Check for library containing initscr
+       test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
+       if test "x$cf_curs_lib" = x
+       then
+               for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
+               do
+                       AC_CHECK_LIB($cf_curs_lib,initscr,[break])
+               done
+       fi
+       test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
+
+       LIBS="-l$cf_curs_lib $cf_save_LIBS"
+       if test "$cf_term_lib" = unknown ; then
+               AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
+               AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+                       [initscr()],
+                       [cf_result=yes],
+                       [cf_result=no])
+               AC_MSG_RESULT($cf_result)
+               test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
+       elif test "$cf_curs_lib" = "$cf_term_lib" ; then
+               :
+       elif test "$cf_term_lib" != predefined ; then
+               AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
+               AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+                       [initscr(); tgoto((char *)0, 0, 0);],
+                       [cf_result=no],
+                       [
+                       LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
+                       AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+                               [initscr()],
+                               [cf_result=yes],
+                               [cf_result=error])
+                       ])
+               AC_MSG_RESULT($cf_result)
+       fi
 fi
 fi