X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Faclocal.m4;h=5220f6964c14e8cb3b9e1fdb0c9242ba14fc0fc7;hp=d6430925ee322629fc1d49ea0a4f1bbf8fa6c960;hb=b7f1cb3f5063cb3a371f8f1c25c24d03a892a429;hpb=7ca9d1eb1a8a995514d4dee312bf136fba88ec62;ds=sidebyside diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index d6430925..5220f696 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.39 2011/10/30 23:24:00 tom Exp $ +dnl $Id: aclocal.m4,v 1.40 2011/11/13 02:11:11 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -3607,7 +3607,7 @@ fi AC_SUBST(PKG_CONFIG_LIBDIR) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_PTHREAD version: 3 updated: 2010/05/29 16:31:02 +dnl CF_WITH_PTHREAD version: 4 updated: 2011/11/12 21:08:44 dnl --------------- dnl Check for POSIX thread library. AC_DEFUN([CF_WITH_PTHREAD], @@ -3623,28 +3623,32 @@ if test "$with_pthread" != no ; then AC_CHECK_HEADER(pthread.h,[ AC_DEFINE(HAVE_PTHREADS_H) - AC_MSG_CHECKING(if we can link with the pthread library) - cf_save_LIBS="$LIBS" - CF_ADD_LIB(pthread) - AC_TRY_LINK([ + for cf_lib_pthread in pthread c_r + do + AC_MSG_CHECKING(if we can link with the $cf_lib_pthread library) + cf_save_LIBS="$LIBS" + CF_ADD_LIB($cf_lib_pthread) + AC_TRY_LINK([ #include ],[ - int rc = pthread_create(0,0,0,0); + int rc = pthread_create(0,0,0,0); ],[with_pthread=yes],[with_pthread=no]) - LIBS="$cf_save_LIBS" - AC_MSG_RESULT($with_pthread) - - if test "$with_pthread" = yes ; then - CF_ADD_LIB(pthread) - AC_DEFINE(HAVE_LIBPTHREADS) - else - AC_MSG_ERROR(Cannot link with pthread library) - fi + LIBS="$cf_save_LIBS" + AC_MSG_RESULT($with_pthread) + test "$with_pthread" = yes && break + done + + if test "$with_pthread" = yes ; then + CF_ADD_LIB($cf_lib_pthread) + AC_DEFINE(HAVE_LIBPTHREADS) + else + AC_MSG_ERROR(Cannot link with pthread library) + fi ]) fi ]) dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 39 updated: 2011/10/30 17:09:50 +dnl CF_XOPEN_SOURCE version: 40 updated: 2011/11/12 21:08:44 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -3693,11 +3697,17 @@ linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; mirbsd*) #(vi - # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks + # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types + cf_XOPEN_SOURCE= + CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; netbsd*) #(vi cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; +openbsd[[4-9]]*) #(vi + # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw + cf_XOPEN_SOURCE=600 + ;; openbsd*) #(vi # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;;