X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=48f47adb9998525585735998727dc4b16eedda3e;hp=341beed3a38831e5a75b09d6e2b7fe94ebc39bef;hb=a1e63be290fce9e589bc57c9f753be09e8ac0cc7;hpb=91fa4688e82518794fcf0c32a36f3fcca5e4c2d5 diff --git a/aclocal.m4 b/aclocal.m4 index 341beed3..48f47adb 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.639 2012/10/27 17:13:57 tom Exp $ +dnl $Id: aclocal.m4,v 1.644 2012/12/23 00:45:32 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1565,37 +1565,6 @@ else fi ]) dnl --------------------------------------------------------------------------- -dnl CF_FUNC_MEMMOVE version: 8 updated: 2012/10/04 20:12:20 -dnl --------------- -dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither -dnl is found, add our own version of memmove to the list of objects. -AC_DEFUN([CF_FUNC_MEMMOVE], -[ -AC_CHECK_FUNC(memmove,,[ -AC_CHECK_FUNC(bcopy,[ - AC_CACHE_CHECK(if bcopy does overlapping moves,cf_cv_good_bcopy,[ - AC_TRY_RUN([ -int main() { - static char data[] = "abcdefghijklmnopqrstuwwxyz"; - char temp[40]; - bcopy(data, temp, sizeof(data)); - bcopy(temp+10, temp, 15); - bcopy(temp+5, temp+15, 10); - ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz")); -} - ], - [cf_cv_good_bcopy=yes], - [cf_cv_good_bcopy=no], - [cf_cv_good_bcopy=unknown]) - ]) - ],[cf_cv_good_bcopy=no]) - if test "$cf_cv_good_bcopy" = yes ; then - AC_DEFINE(USE_OK_BCOPY,1,[Define to 1 to use bcopy when memmove is unavailable]) - else - AC_DEFINE(USE_MY_MEMMOVE,1,[Define to 1 to use replacement function when memmove is unavailable]) - fi -])])dnl -dnl --------------------------------------------------------------------------- dnl CF_FUNC_NANOSLEEP version: 4 updated: 2012/10/06 17:56:13 dnl ----------------- dnl Check for existence of workable nanosleep() function. Some systems, e.g., @@ -2747,7 +2716,7 @@ AC_DEFUN([CF_HELP_MESSAGE], [AC_DIVERT_HELP([$1])dnl ])dnl dnl --------------------------------------------------------------------------- -dnl CF_INCLUDE_DIRS version: 6 updated: 2009/01/06 19:37:40 +dnl CF_INCLUDE_DIRS version: 7 updated: 2012/11/10 19:15:05 dnl --------------- dnl Construct the list of include-options according to whether we're building dnl in the source directory or using '--srcdir=DIR' option. If we're building @@ -2755,21 +2724,21 @@ dnl with gcc, don't append the includedir if it happens to be /usr/include, dnl since that usually breaks gcc's shadow-includes. AC_DEFUN([CF_INCLUDE_DIRS], [ -CPPFLAGS="$CPPFLAGS -I. -I../include" -if test "$srcdir" != "."; then - CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include" -fi if test "$GCC" != yes; then - CPPFLAGS="$CPPFLAGS -I\${includedir}" + CPPFLAGS="-I\${includedir} $CPPFLAGS" elif test "$includedir" != "/usr/include"; then if test "$includedir" = '${prefix}/include' ; then if test $prefix != /usr ; then - CPPFLAGS="$CPPFLAGS -I\${includedir}" + CPPFLAGS="-I\${includedir} $CPPFLAGS" fi else - CPPFLAGS="$CPPFLAGS -I\${includedir}" + CPPFLAGS="-I\${includedir} $CPPFLAGS" fi fi +if test "$srcdir" != "."; then + CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS" +fi +CPPFLAGS="-I. -I../include $CPPFLAGS" AC_SUBST(CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- @@ -5258,7 +5227,7 @@ CF_VERBOSE(...checked $1 [$]$1) AC_SUBST(EXTRA_LDFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 70 updated: 2012/02/25 15:20:07 +dnl CF_SHARED_OPTS version: 71 updated: 2012/12/22 19:34:47 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -5314,6 +5283,7 @@ AC_DEFUN([CF_SHARED_OPTS], AC_MSG_RESULT($cf_cv_shlib_version) cf_cv_rm_so_locs=no + cf_try_cflags= # Some less-capable ports of gcc support only -fpic CC_SHARED_OPTS= @@ -5366,7 +5336,7 @@ CF_EOF chmod +x mk_shared_lib.sh ;; darwin*) #(vi - EXTRA_CFLAGS="-no-cpp-precomp" + cf_try_cflags="no-cpp-precomp" CC_SHARED_OPTS="-dynamic" MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi @@ -5585,6 +5555,33 @@ CF_EOF ;; esac + if test -n "$cf_try_cflags" + then +cat > conftest.$ac_ext < +int main(int argc, char *argv[[]]) +{ + printf("hello\n"); + return (argv[[argc-1]] == 0) ; +} +EOF + cf_save_CFLAGS="$CFLAGS" + for cf_opt in $cf_try_cflags + do + CFLAGS="$cf_save_CFLAGS -$cf_opt" + AC_MSG_CHECKING(if CFLAGS option -$cf_opt works) + if AC_TRY_EVAL(ac_compile); then + AC_MSG_RESULT(yes) + cf_save_CFLAGS="$CFLAGS" + else + AC_MSG_RESULT(no) + fi + done + CFLAGS="$cf_save_CFLAGS" + fi + + # RPATH_LIST is a colon-separated list of directories test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}" test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"