mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Update the `configure' tool chain. * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by src/makefile.am. (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED. (AC_OUTPUT): Add m4/Makefile. Bump to bison 1.28a, 1.29 has never been released. * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are handled via src/Makefile.am. (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by autoheader. * Makefile.am (SUBDIRS): Add m4. (ACLOCAL_AM_FLAGS): New variable. (AUTOMAKE_OPTIONS): Add check-news. * src/Makefile.am (bison.simple): Use awk to replace #line lines with the proper line number and file name. (DEFS): Propagate the location of bison library files and of the locale files. (INCLUDES): Added `-I ..' so that one can compile with srcdir != builddir. * acinclude.m4: Remove, replaced by the directory m4. * m4/Makefile.am (EXTRA_DIST): New variable. * m4/gettext.m4: New file, from the fileutils. * m4/lcmessage.m4: Likewise * m4/progtest.m4: Likewise. * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
dnl FIXME: This should be soon obsoleted by AC_CHECK_DECL.
|
|
|
|
dnl See whether we need a declaration for a function.
|
|
dnl BISON_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
|
|
AC_DEFUN(BISON_NEED_DECLARATION,
|
|
[AC_MSG_CHECKING([whether $1 must be declared])
|
|
AC_CACHE_VAL(bison_cv_decl_needed_$1,
|
|
[AC_TRY_COMPILE([
|
|
#include <stdio.h>
|
|
#ifdef HAVE_STRING_H
|
|
#include <string.h>
|
|
#else
|
|
#ifdef HAVE_STRINGS_H
|
|
#include <strings.h>
|
|
#endif
|
|
#endif
|
|
#ifdef HAVE_STDLIB_H
|
|
#include <stdlib.h>
|
|
#endif
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
#ifndef HAVE_RINDEX
|
|
#define rindex strrchr
|
|
#endif
|
|
#ifndef HAVE_INDEX
|
|
#define index strchr
|
|
#endif
|
|
$2],
|
|
[char *(*pfn) = (char *(*)) $1],
|
|
eval "bison_cv_decl_needed_$1=no", eval "bison_cv_decl_needed_$1=yes")])
|
|
if eval "test \"`echo '$bison_cv_decl_needed_'$1`\" = yes"; then
|
|
AC_MSG_RESULT(yes)
|
|
bison_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
|
AC_DEFINE_UNQUOTED($bison_tr_decl)
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
fi
|
|
])dnl
|
|
|
|
dnl Check multiple functions to see whether each needs a declaration.
|
|
dnl BISON_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
|
|
AC_DEFUN(BISON_NEED_DECLARATIONS,
|
|
[for ac_func in $1
|
|
do
|
|
BISON_NEED_DECLARATION($ac_func, $2)
|
|
done
|
|
])
|