summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-11-18 23:00:31 +0200
committerArnold D. Robbins <arnold@skeeve.com>2010-11-18 23:00:31 +0200
commit6f3612539c425da2bc1d34db621696e6a273b01c (patch)
tree9623b3ac2c54a93e5eed3be2b1dda7f4e4bf0e47 /m4
parent4e3701015635401df2fc4da58abaab7645f4ebd3 (diff)
downloadgawk-6f3612539c425da2bc1d34db621696e6a273b01c.tar.gz
Bring latest byte code gawk into git. Hurray!
Diffstat (limited to 'm4')
-rw-r--r--m4/arch.m44
-rw-r--r--m4/readline.m463
2 files changed, 65 insertions, 2 deletions
diff --git a/m4/arch.m4 b/m4/arch.m4
index 97b43e64..2402435e 100644
--- a/m4/arch.m4
+++ b/m4/arch.m4
@@ -64,8 +64,8 @@ AC_MSG_CHECKING([for z/OS USS compilation])
if test "OS/390" = "`uname`"
then
CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC"
- # Must rebuild awkgram.c from Bison for EBCDIC
- rm -f awkgram.c
+ # Must rebuild awkgram.c and command.c from Bison for EBCDIC
+ rm -f awkgram.c command.c
ac_cv_zos_uss=yes
else
ac_cv_zos_uss=no
diff --git a/m4/readline.m4 b/m4/readline.m4
new file mode 100644
index 00000000..d2523460
--- /dev/null
+++ b/m4/readline.m4
@@ -0,0 +1,63 @@
+dnl Check for readline and dependencies
+dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+dnl
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl Defines HAVE_LIBREADLINE to 1 if a working readline setup is
+dnl found, and sets @LIBREADLINE@ to the necessary libraries.
+
+AC_DEFUN([GNUPG_CHECK_READLINE],
+[
+ AC_ARG_WITH(readline,
+ AC_HELP_STRING([--with-readline=DIR],
+ [look for the readline library in DIR]),
+ [_do_readline=$withval],[_do_readline=yes])
+
+ if test "$_do_readline" != "no" ; then
+ if test -d "$withval" ; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
+
+ for _termcap in "" "-ltermcap" "-lcurses" "-lncurses" ; do
+ _readline_save_libs=$LIBS
+ _combo="-lreadline${_termcap:+ $_termcap}"
+ LIBS="$LIBS $_combo"
+
+ AC_MSG_CHECKING([whether readline via \"$_combo\" is present and sane])
+
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([
+#include <stdio.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+],[
+rl_completion_func_t *completer;
+add_history("foobar");
+rl_catch_signals=0;
+rl_inhibit_completion=0;
+rl_attempted_completion_function=NULL;
+rl_completion_matches(NULL,NULL);
+]),_found_readline=yes,_found_readline=no)
+
+ AC_MSG_RESULT([$_found_readline])
+
+ LIBS=$_readline_save_libs
+
+ if test $_found_readline = yes ; then
+ AC_DEFINE(HAVE_LIBREADLINE,1,
+ [Define to 1 if you have a fully functional readline library.])
+ AC_SUBST(LIBREADLINE,$_combo)
+ break
+ fi
+ done
+
+ unset _termcap
+ unset _readline_save_libs
+ unset _combo
+ unset _found_readline
+ fi
+])dnl