From 1d411fa3c1684db23ed6fd3e757e987962e19ecd Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 8 Mar 2004 17:53:54 +0000 Subject: [PATCH] * configure.ac (YACC): Do not add `-d' here... * src/Makefile.am (AM_YFLAGS): ... do it here. (BUILT_SOURCES): New variable. --- lbtt/ChangeLog | 4 ++++ lbtt/configure.ac | 35 ++++++++++++++++++++++++----------- lbtt/src/Makefile.am | 3 +++ 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/lbtt/ChangeLog b/lbtt/ChangeLog index 1984cc295..b55647fb4 100644 --- a/lbtt/ChangeLog +++ b/lbtt/ChangeLog @@ -1,5 +1,9 @@ 2004-03-08 Alexandre Duret-Lutz + * configure.ac (YACC): Do not add `-d' here... + * src/Makefile.am (AM_YFLAGS): ... do it here. + (BUILT_SOURCES): New variable. + * doc/texinfo.tex: New upstream version. 2004-02-11 Alexandre Duret-Lutz diff --git a/lbtt/configure.ac b/lbtt/configure.ac index 57a31b35f..fc49a7d13 100644 --- a/lbtt/configure.ac +++ b/lbtt/configure.ac @@ -1,8 +1,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.53]) -AC_INIT([lbtt], [1.0.1], [heikki.tauriainen@hut.fi]) -AC_REVISION([Revision: 1.1]) +AC_INIT([lbtt], [1.0.3], [heikki.tauriainen@hut.fi]) +AC_REVISION([Revision: 1.3]) AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) @@ -18,10 +18,6 @@ AC_PROG_CXXCPP AM_PROG_LEX AC_PROG_YACC -YACC="${YACC} -d" - - - # Check whether the user has explicitly disabled the test for the availability # of the GNU readline library. @@ -37,7 +33,7 @@ AC_ARG_WITH([readline], # Check for the availability of headers. AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h obstack.h stdlib.h unistd.h]) +AC_CHECK_HEADERS([fcntl.h]) # Check for the availability of the GNU readline headers. @@ -51,6 +47,22 @@ fi AC_LANG([C++]) +# Check for the availability of the obstack.h header. GNU libc 2.3.2 includes a +# version of this header that cannot be compiled using g++; enable a workaround +# if necessary. + +AC_CHECK_HEADERS([obstack.h], + [AC_MSG_CHECKING([whether obstack.h compilation workaround is needed]) + AC_TRY_COMPILE([#include ], + [#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 3 + obstack_alloc(0, 0); + #endif], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + AC_DEFINE([GLIBC_OBSTACK_WORKAROUND], + [1], + [Define to 1 to enable an obstack.h C++ compilation workaround for GNU libc 2.3.])])]) + # Check for the availablility of the sstream or strstream header. AC_CHECK_HEADERS([sstream], @@ -85,7 +97,7 @@ if test "${slist_header}" != no; then [${slist_namespace}::slist s;], [break]) fi - done + done if test "${slist_namespace}" != error; then AC_MSG_RESULT([header <${slist_header}>, typename ${slist_namespace}::slist]) AC_DEFINE([HAVE_SLIST], @@ -131,11 +143,11 @@ AC_C_INLINE # Checks for library functions. AC_TYPE_SIGNAL -AC_CHECK_FUNCS([mkdir strchr strtod strtol strtoul getopt_long]) +AC_CHECK_FUNCS([mkdir strchr strtod strtol strtoul getopt_long isatty]) if test x"${ac_cv_func_getopt_long}" = xno; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) - AC_CHECK_HEADERS([libintl.h string.h strings.h]) + AC_CHECK_HEADERS([libintl.h]) AC_CHECK_FUNCS([memset]) fi @@ -147,7 +159,8 @@ if test "${readline}" = yes; then for READLINELIBS in "-lreadline" "-lreadline -lcurses" "-lreadline -ltermcap" error; do if test "${READLINELIBS}" != error; then LIBS="${oldlibs} ${READLINELIBS}" - AC_TRY_LINK([#include <${rl_history_h}> + AC_TRY_LINK([#include + #include <${rl_history_h}> #include <${rl_readline_h}>], [using_history(); readline(""); add_history("");], [break]) diff --git a/lbtt/src/Makefile.am b/lbtt/src/Makefile.am index 2a4161321..283ba0601 100644 --- a/lbtt/src/Makefile.am +++ b/lbtt/src/Makefile.am @@ -1,3 +1,6 @@ +BUILT_SOURCES = Config-parse.h NeverClaim-parse.h +AM_YFLAGS = -d + bin_PROGRAMS = lbtt lbtt-translate lbtt_SOURCES = \ BitArray.cc \