X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/e287361d35cef81ceee2b6cf538455d93e8e3beb..99cde35bb58605e86541acd812860c222e375af2:/configure.ac diff --git a/configure.ac b/configure.ac index 6a35936..0b9bab1 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_PREREQ([2.68]) AC_INIT([cdecl99], [0.1], [nbowler@draconx.ca]) AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) +AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects]) AM_SILENT_RULES([yes]) AC_PROG_CC_C99 @@ -18,6 +18,25 @@ gl_EARLY LT_INIT gl_INIT +AC_CACHE_CHECK([if readline supports add_history], [dx_cv_rl_add_history], [dnl +dx_cv_rl_add_history=no +dx_save_libs=$LIBS +LIBS="$LIBS $LIBREADLINE" +AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl +#include +#if HAVE_READLINE_HISTORY_H +# include +#endif +], [dnl +(*add_history)(""); +])], [dx_cv_rl_add_history=yes], [dx_cv_rl_add_history=no]) +LIBS=$dx_save_libs +]) + +AS_IF([test x"$dx_cv_rl_add_history" = x"yes"], + [AC_DEFINE([HAVE_RL_ADD_HISTORY], [1], + [Define to 1 if readline supports add_history.])]) + m4_include([lib/gnulib.mk]) DX_GLSYM_PREFIX([cdecl__]) @@ -55,7 +74,6 @@ AS_CASE([$with_gsl], AM_CONDITIONAL([HAVE_GSL], [test x"$have_gsl" = x"yes"]) AC_CONFIG_FILES([ - exported.sh Makefile ]) AC_OUTPUT