]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/aclocal.m4
ncurses 6.0 - patch 20160326
[ncurses.git] / test / aclocal.m4
index 546baa71c584b497f7e2a533c71e064b33bbfc5d..e28e0eb380e3f1200da5f1b00b080656446a709c 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 2003-2014,2015 Free Software Foundation, Inc.              *
+dnl Copyright (c) 2003-2015,2016 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -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.124 2015/12/13 02:14:52 tom Exp $
+dnl $Id: aclocal.m4,v 1.126 2016/02/21 00:28:12 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -1725,7 +1725,7 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147"
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LD_RPATH_OPT version: 6 updated: 2015/04/12 15:39:00
+dnl CF_LD_RPATH_OPT version: 7 updated: 2016/02/20 18:01:19
 dnl ---------------
 dnl For the given system and compiler, find the compiler flags to pass to the
 dnl loader to use the "rpath" feature.
@@ -1743,13 +1743,13 @@ case $cf_cv_system_name in
                LD_RPATH_OPT="-rpath "
        fi
        ;;
-(linux*|gnu*|k*bsd*-gnu)
+(linux*|gnu*|k*bsd*-gnu|freebsd*)
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
 (openbsd[[2-9]].*|mirbsd*)
        LD_RPATH_OPT="-Wl,-rpath,"
        ;;
-(dragonfly*|freebsd*)
+(dragonfly*)
        LD_RPATH_OPT="-rpath "
        ;;
 (netbsd*)
@@ -2253,6 +2253,23 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
 AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_PTHREADS version: 1 updated: 2016/02/20 19:23:20
+dnl -------------------
+dnl Use this followup check to ensure that we link with pthreads if ncurses
+dnl uses it.
+AC_DEFUN([CF_NCURSES_PTHREADS],[
+: ${cf_nculib_root:=ifelse($1,,ncurses,$1)}
+AC_CACHE_CHECK(if $cf_nculib_root uses pthreads, cf_cv_ncurses_pthreads,[
+       AC_CHECK_LIB($cf_nculib_root,_nc_init_pthreads,
+               cf_cv_ncurses_pthreads=yes,
+               cf_cv_ncurses_pthreads=no)
+])
+if test "$cf_cv_ncurses_pthreads" = yes
+then
+       CF_ADD_LIBS(-lpthread)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_NCURSES_VERSION version: 14 updated: 2012/10/06 08:57:51
 dnl ------------------
 dnl Check for the version of ncurses, to aid in reporting bugs, etc.
@@ -3198,7 +3215,7 @@ if test "$with_dmalloc" = yes ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_NCURSES_ETC version: 4 updated: 2015/04/25 20:53:11
+dnl CF_WITH_NCURSES_ETC version: 5 updated: 2016/02/20 19:23:20
 dnl -------------------
 dnl Use this macro for programs which use any variant of "curses", e.g.,
 dnl "ncurses", and "PDCurses".  Programs that can use curses and some unrelated
@@ -3257,6 +3274,8 @@ case $cf_cv_screen in
        ;;
 esac
 
+CF_NCURSES_PTHREADS($cf_cv_screen)
+
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21