1 dnl Copyright © 2011-2013, 2020 Nick Bowler
3 dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 dnl This is free software: you are free to do what the fuck you want to.
5 dnl There is NO WARRANTY, to the extent permitted by law.
8 AC_INIT([cdecl99], [0.1], [nbowler@draconx.ca])
9 AC_CONFIG_HEADER([config.h])
11 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
12 AM_SILENT_RULES([yes])
22 AC_CACHE_CHECK([if readline supports add_history], [dx_cv_rl_add_history], [dnl
23 dx_cv_rl_add_history=no
25 LIBS="$LIBS $LIBREADLINE"
26 AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
28 #if HAVE_READLINE_HISTORY_H
29 # include <readline/history.h>
33 ])], [dx_cv_rl_add_history=yes], [dx_cv_rl_add_history=no])
37 AS_IF([test x"$dx_cv_rl_add_history" = x"yes"],
38 [AC_DEFINE([HAVE_RL_ADD_HISTORY], [1],
39 [Define to 1 if readline supports add_history.])])
41 m4_include([lib/gnulib.mk])
42 DX_GLSYM_PREFIX([cdecl__])
44 dnl We provide our own makefile rules for gettext. Disable tracing of
45 dnl AM_GNU_GETTEXT to prevent autoreconf from running autopoint, and to
46 dnl prevent automake from growing gratuitous error conditions.
47 m4_traceoff([AM_GNU_GETTEXT])
48 AM_GNU_GETTEXT([external])
51 AC_ARG_VAR([FLEX], [Command to invoke flex. Defaults to flex.])
52 AC_ARG_VAR([FLEXFLAGS], [Additional options to pass to flex.])
53 AC_CHECK_PROGS([FLEX], [flex], [flex])
55 AC_ARG_VAR([BISON], [Command to invoke GNU Bison. Defaults to bison.])
56 AC_ARG_VAR([BISONFLAGS], [Additional options to pass to Bison.])
57 AC_CHECK_PROGS([BISON], [bison], [bison])
60 AH_TOP([#include <conf_pre.h>])
61 AH_BOTTOM([#include <conf_post.h>])
64 [AS_HELP_STRING([--with-gsl],
65 [specify whether to build test programs requiring the GNU Scientific Library. [default=auto]]
66 )], [with_gsl=$withval], [with_gsl=auto])
70 [yes], [DX_CHECK_GSL([1.0], [have_gsl=yes])],
71 [DX_CHECK_GSL([1.0], [have_gsl=yes], [have_gsl=no])])
72 AM_CONDITIONAL([HAVE_GSL], [test x"$have_gsl" = x"yes"])
74 AC_CONFIG_TESTDIR([.])
76 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])