-# readline.m4 serial 5
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# readline.m4 serial 7
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Add $INCREADLINE to CPPFLAGS before performing the following checks,
dnl because if the user has installed libreadline and not disabled its use
dnl Add $INCREADLINE to CPPFLAGS before performing the following checks,
dnl because if the user has installed libreadline and not disabled its use
dnl will then succeed.
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCREADLINE])
dnl will then succeed.
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCREADLINE])
- AC_TRY_LINK([#include <stdio.h>
-#include <readline/readline.h>],
- [readline((char*)0);],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+#include <readline/readline.h>]],
+ [[readline((char*)0);]])],
if test "$gl_cv_lib_readline" != " -l"; then
LIBREADLINE="$LIBREADLINE$gl_cv_lib_readline"
LTLIBREADLINE="$LTLIBREADLINE$gl_cv_lib_readline"
if test "$gl_cv_lib_readline" != " -l"; then
LIBREADLINE="$LIBREADLINE$gl_cv_lib_readline"
LTLIBREADLINE="$LTLIBREADLINE$gl_cv_lib_readline"