X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=d73d5eaa34dfd5f4fd036dd803bbfd13e5b2dcba;hp=fdac8c12a614487d7cc076e989ebfe4d25ce794f;hb=0ac2306dd3aaab1338d8b1458c15a7e476cfc3ff;hpb=0141530788318928d6e4da45eb1ec88c86940645 diff --git a/aclocal.m4 b/aclocal.m4 index fdac8c12..d73d5eaa 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.535 2010/06/19 23:30:31 tom Exp $ +dnl $Id: aclocal.m4,v 1.544 2010/09/04 23:25:24 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -291,7 +291,7 @@ dnl $1 = libraries to add, with the "-l", etc. dnl $2 = variable to update (default $LIBS) AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_SUBDIR_PATH version: 2 updated: 2007/07/29 10:12:59 +dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12 dnl ------------------ dnl Append to a search-list for a nonstandard header/lib-file dnl $1 = the variable to return as result @@ -303,7 +303,7 @@ AC_DEFUN([CF_ADD_SUBDIR_PATH], [ test "$4" != "$5" && \ test -d "$4" && \ -ifelse([$5],NONE,,[(test $5 = NONE || test -d $5) &&]) { +ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) { test -n "$verbose" && echo " ... testing for $3-directories under $4" test -d $4/$3 && $1="[$]$1 $4/$3" test -d $4/$3/$2 && $1="[$]$1 $4/$3/$2" @@ -864,7 +864,7 @@ fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CHECK_GPM_WGETCH version: 1 updated: 2007/04/28 14:38:06 +dnl CF_CHECK_GPM_WGETCH version: 2 updated: 2010/08/14 18:25:37 dnl ------------------- dnl Check if GPM is already linked with curses. If so - and if the linkage dnl is not "weak" - warn about this because it can create problems linking @@ -898,7 +898,7 @@ CF_EOF test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no fi fi - rm -f conftest* + rm -rf conftest* LIBS="$cf_save_LIBS" fi ]) @@ -1057,7 +1057,7 @@ done AC_SUBST(DIRS_TO_MAKE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_DISABLE_LEAKS version: 5 updated: 2010/03/13 15:14:55 +dnl CF_DISABLE_LEAKS version: 6 updated: 2010/07/23 04:14:32 dnl ---------------- dnl Combine no-leak checks with the libraries or tools that are used for the dnl checks. @@ -1076,6 +1076,7 @@ AC_MSG_RESULT($with_no_leaks) if test "$with_no_leaks" = yes ; then AC_DEFINE(NO_LEAKS) + AC_DEFINE(YY_NO_LEAKS) fi ])dnl dnl --------------------------------------------------------------------------- @@ -1659,7 +1660,7 @@ if test "$GCC" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_WARNINGS version: 25 updated: 2010/04/24 11:03:31 +dnl CF_GCC_WARNINGS version: 26 updated: 2010/08/14 18:25:37 dnl --------------- dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: @@ -1763,7 +1764,7 @@ then done CFLAGS="$cf_save_CFLAGS" fi -rm -f conftest* +rm -rf conftest* AC_SUBST(EXTRA_CFLAGS) ])dnl @@ -1797,7 +1798,7 @@ fi AC_SUBST(PRAGMA_UNREF) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GNAT_TRY_LINK version: 1 updated: 2004/08/21 19:02:08 +dnl CF_GNAT_TRY_LINK version: 2 updated: 2010/08/14 18:25:37 dnl ---------------- dnl Verify that a test program compiles/links with GNAT. dnl $cf_ada_make is set to the program that compiles/links @@ -1809,7 +1810,7 @@ dnl $3 is the shell command to execute if successful dnl $4 is the shell command to execute if not successful AC_DEFUN([CF_GNAT_TRY_LINK], [ -rm -f conftest* +rm -rf conftest* cat >>conftest.ads <>conftest.ads <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <>$cf_edit_man <\$TMP CF_EOF @@ -3907,13 +3983,13 @@ fi test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_MKSTEMP version: 6 updated: 2010/05/22 14:44:30 +dnl CF_MKSTEMP version: 7 updated: 2010/08/14 18:25:37 dnl ---------- dnl Check for a working mkstemp. This creates two files, checks that they are dnl successfully created and distinct (AmigaOS apparently fails on the last). AC_DEFUN([CF_MKSTEMP],[ AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ -rm -f conftest* +rm -rf conftest* AC_TRY_RUN([ #include #include @@ -4277,7 +4353,7 @@ AC_PROG_AWK test -z "$AWK" && AC_MSG_ERROR(No awk program found) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_CC_C_O version: 2 updated: 2006/12/16 15:55:46 +dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37 dnl -------------- dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that dnl the output file can be renamed, and allows for a shell variable that can @@ -4307,7 +4383,7 @@ then else eval cf_cv_prog_$1_c_o=no fi -rm -f conftest* +rm -rf conftest* ])dnl if test $cf_cv_prog_$1_c_o = yes; then AC_MSG_RESULT([yes]) @@ -4460,7 +4536,29 @@ AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) AC_SUBST(LINT_OPTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_REGEX version: 7 updated: 2010/05/29 16:31:02 +dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37 +dnl ------------ +dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f" +dnl option if it is supported. +AC_DEFUN([CF_PROG_LN_S],[ +AC_PROG_LN_S +AC_MSG_CHECKING(if $LN_S -f options work) + +rm -f conf$$.src conf$$dst +echo >conf$$.dst +echo first >conf$$.src +if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then + cf_prog_ln_sf=yes +else + cf_prog_ln_sf=no +fi +rm -f conf$$.dst conf$$src +AC_MSG_RESULT($cf_prog_ln_sf) + +test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_REGEX version: 8 updated: 2010/08/07 14:09:44 dnl -------- dnl Attempt to determine if we've got one of the flavors of regular-expression dnl code that we can support. @@ -4469,8 +4567,15 @@ AC_DEFUN([CF_REGEX], cf_regex_func=no +cf_regex_libs="regex re" +case $host_os in #(vi +mingw*) + cf_regex_libs="regex.dll $cf_regex_libs" + ;; +esac + AC_CHECK_FUNC(regcomp,[cf_regex_func=regcomp],[ - for cf_regex_lib in regex re + for cf_regex_lib in $cf_regex_libs do AC_CHECK_LIB($cf_regex_lib,regcomp,[ CF_ADD_LIB($cf_regex_lib) @@ -5141,7 +5246,7 @@ if test "$cf_cv_sizechange" != no ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SRC_MODULES version: 20 updated: 2008/12/27 12:30:03 +dnl CF_SRC_MODULES version: 21 updated: 2010/09/04 17:37:40 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 @@ -5225,14 +5330,19 @@ for cf_dir in $cf_cv_src_modules do SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir" done -SRC_SUBDIRS="$SRC_SUBDIRS test" +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++" ADA_SUBDIRS= if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then SRC_SUBDIRS="$SRC_SUBDIRS Ada95" - ADA_SUBDIRS="gen src samples" + ADA_SUBDIRS="gen src" + if test "x$cf_with_tests" != "xno" ; then + ADA_SUBDIRS="$ADA_SUBDIRS samples" + fi fi SUB_MAKEFILES= @@ -5552,7 +5662,7 @@ AC_DEFUN([CF_UPPER], $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- -dnl CF_UTF8_LIB version: 6 updated: 2010/04/21 06:20:50 +dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28 dnl ----------- dnl Check for multibyte support, and if not found, utf8 compatibility library AC_DEFUN([CF_UTF8_LIB], @@ -5574,7 +5684,7 @@ if test "$cf_cv_utf8_lib" = "add-on" ; then AC_DEFINE(HAVE_LIBUTF8_H) CF_ADD_INCDIR($cf_cv_header_path_utf8) CF_ADD_LIBDIR($cf_cv_library_path_utf8) - LIBS="$cf_cv_library_file_utf8 $LIBS" + CF_ADD_LIBS($cf_cv_library_file_utf8) fi ])dnl dnl --------------------------------------------------------------------------- @@ -5712,71 +5822,76 @@ $1_ABI=$cf_cv_abi_version ]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_COMPILER version: 1 updated: 2010/06/19 15:22:18 +dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58 dnl -------------------- dnl Command-line option to specify the Ada95 compiler. AC_DEFUN([CF_WITH_ADA_COMPILER],[ +AC_MSG_CHECKING(for ada-compiler) AC_ARG_WITH(ada-compiler, [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)], [cf_ada_compiler=$withval], [cf_ada_compiler=gnatmake]) AC_SUBST(cf_ada_compiler) +AC_MSG_RESULT($cf_ada_compiler) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_INCLUDE version: 1 updated: 2010/06/19 15:22:18 +dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58 dnl ------------------- dnl Command-line option to specify where Ada includes will install. AC_DEFUN([CF_WITH_ADA_INCLUDE],[ +AC_MSG_CHECKING(for ada-include) CF_WITH_PATH(ada-include, [ --with-ada-include=DIR Ada includes are in DIR], ADA_INCLUDE, PREFIX/share/ada/adainclude, [$]prefix/share/ada/adainclude) AC_SUBST(ADA_INCLUDE) +AC_MSG_RESULT($ADA_INCLUDE) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_OBJECTS version: 1 updated: 2010/06/19 15:22:18 +dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58 dnl ------------------- dnl Command-line option to specify where Ada objects will install. AC_DEFUN([CF_WITH_ADA_OBJECTS],[ +AC_MSG_CHECKING(for ada-objects) CF_WITH_PATH(ada-objects, [ --with-ada-objects=DIR Ada objects are in DIR], ADA_OBJECTS, PREFIX/lib/ada/adalib, [$]prefix/lib/ada/adalib) AC_SUBST(ADA_OBJECTS) +AC_MSG_RESULT($ADA_OBJECTS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_ADA_SHAREDLIB version: 1 updated: 2010/06/19 16:12:21 +dnl CF_WITH_ADA_SHAREDLIB version: 2 updated: 2010/06/26 17:35:58 dnl --------------------- dnl Command-line option to specify if an Ada95 shared-library should be built, dnl and optionally what its soname should be. AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[ -AC_MSG_CHECKING(if you want to build Ada95 shared library) +AC_MSG_CHECKING(if an Ada95 shared-library should be built) AC_ARG_WITH(ada-sharedlib, [ --with-ada-sharedlib=XX build Ada95 shared-library], [with_ada_sharedlib=$withval], [with_ada_sharedlib=no]) AC_MSG_RESULT($with_ada_sharedlib) +ADA_SHAREDLIB='lib$(LIB_NAME).so.1' +MAKE_ADA_SHAREDLIB="#" + if test "x$with_ada_sharedlib" != xno then MAKE_ADA_SHAREDLIB= if test "x$with_ada_sharedlib" != xyes then ADA_SHAREDLIB="$with_ada_sharedlib" - else - ADA_SHAREDLIB='lib$(LIB_NAME).so.1' fi -else - MAKE_ADA_SHAREDLIB="#" fi AC_SUBST(ADA_SHAREDLIB) AC_SUBST(MAKE_ADA_SHAREDLIB) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_DBMALLOC version: 6 updated: 2006/12/16 14:24:05 +dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47 dnl ---------------- dnl Configure-option for dbmalloc. The optional parameter is used to override dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests. @@ -5787,11 +5902,11 @@ CF_NO_LEAKS_OPTION(dbmalloc, if test "$with_dbmalloc" = yes ; then AC_CHECK_HEADER(dbmalloc.h, - [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse($1,,[],[,$1]))]) + [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse([$1],,[],[,$1]))]) fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_DMALLOC version: 6 updated: 2006/12/16 14:24:05 +dnl CF_WITH_DMALLOC version: 7 updated: 2010/06/21 17:26:47 dnl --------------- dnl Configure-option for dmalloc. The optional parameter is used to override dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests. @@ -5802,7 +5917,7 @@ CF_NO_LEAKS_OPTION(dmalloc, if test "$with_dmalloc" = yes ; then AC_CHECK_HEADER(dmalloc.h, - [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse($1,,[],[,$1]))]) + [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))]) fi ])dnl dnl ---------------------------------------------------------------------------