X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=212d27f8f8ae43e3589161f907ed39f88440ca11;hp=6bbb13254db4b56f04ab54a03186117e52bb1269;hb=29b24b6ba47681c8a26007492567c3daecb3defe;hpb=7ca9d1eb1a8a995514d4dee312bf136fba88ec62 diff --git a/aclocal.m4 b/aclocal.m4 index 6bbb1325..212d27f8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.581 2011/10/30 21:13:25 tom Exp $ +dnl $Id: aclocal.m4,v 1.588 2011/11/26 21:41:37 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -5695,7 +5695,7 @@ if test "$cf_cv_sizechange" != no ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SRC_MODULES version: 22 updated: 2011/10/22 14:58:07 +dnl CF_SRC_MODULES version: 23 updated: 2011/11/26 16:35:15 dnl -------------- dnl For each parameter, test if the source-directory exists, and if it contains dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll @@ -5718,6 +5718,7 @@ else TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2" fi +PC_MODULES_TO_MAKE="ncurses" cf_cv_src_modules= for cf_dir in $1 do @@ -5756,6 +5757,7 @@ do TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS" TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2" fi + PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}" fi fi done @@ -5783,7 +5785,12 @@ if test "x$cf_with_tests" != "xno" ; then SRC_SUBDIRS="$SRC_SUBDIRS test" fi test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc" -test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++" +if test "$cf_with_cxx_binding" != no; then + PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++" + SRC_SUBDIRS="$SRC_SUBDIRS c++" +fi + +AC_SUBST(PC_MODULES_TO_MAKE) ADA_SUBDIRS= if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then @@ -6691,7 +6698,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], @@ -6707,23 +6714,27 @@ 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 ]) @@ -6791,7 +6802,7 @@ CF_NO_LEAKS_OPTION(valgrind, [USE_VALGRIND]) ])dnl 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, @@ -6840,11 +6851,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 ;;