]> git.saurik.com Git - bison.git/commitdiff
* configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
authorAkim Demaille <akim@epita.fr>
Mon, 26 Nov 2001 09:19:56 +0000 (09:19 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 26 Nov 2001 09:19:56 +0000 (09:19 +0000)
* lib/Makefile.am (libbison_a_SOURCES): Adjust.

ChangeLog
config.hin
configure
configure.in
lib/Makefile.am
lib/Makefile.in
src/files.c

index 39ea13d6a8081878e8fba47b1eca991bb6693ebc..2fccc9396a51db3612c7e9c47930a5b3c28eee26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-26  Akim Demaille  <akim@epita.fr>
+
+       * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
+       * lib/Makefile.am (libbison_a_SOURCES): Adjust.
+
 2001-11-26  Akim Demaille  <akim@epita.fr>
 
        * src/conflicts.c (conflicts_print): Don't complain at all when
 2001-11-26  Akim Demaille  <akim@epita.fr>
 
        * src/conflicts.c (conflicts_print): Don't complain at all when
index 798b33ffba86a6164753a972aeb9f8ad28f275ad..3fd84502c1babb6afe9eb09f0c852db409a86cc5 100644 (file)
 /* Define to 1 if you have the <nl_types.h> header file. */
 #undef HAVE_NL_TYPES_H
 
 /* Define to 1 if you have the <nl_types.h> header file. */
 #undef HAVE_NL_TYPES_H
 
+/* Define to 1 if libc includes obstacks. */
+#undef HAVE_OBSTACK
+
 /* Define to 1 if you have the `putenv' function. */
 #undef HAVE_PUTENV
 
 /* Define to 1 if you have the `putenv' function. */
 #undef HAVE_PUTENV
 
index 7ca54b05bbd95fb003b5c7c6721364e63c80abe7..c0fe38982a7c3b3695c266f74d0c2cff684092c0 100755 (executable)
--- a/configure
+++ b/configure
@@ -4840,6 +4840,110 @@ _ACEOF
 
 fi
 
 
 fi
 
+echo "$as_me:$LINENO: checking for obstacks" >&5
+echo $ECHO_N "checking for obstacks... $ECHO_C" >&6
+if test "${ac_cv_func_obstack+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include "obstack.h"
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+struct obstack *mem; obstack_free(mem,(char *) 0)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_obstack=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_obstack=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5
+echo "${ECHO_T}$ac_cv_func_obstack" >&6
+if test $ac_cv_func_obstack = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OBSTACK 1
+_ACEOF
+
+else
+  LIBOBJS="$LIBOBJS obstack.$ac_objext"
+fi
+
+echo "$as_me:$LINENO: checking for error_at_line" >&5
+echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6
+if test "${ac_cv_lib_error_at_line+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "");
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_error_at_line=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_error_at_line=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
+echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6
+if test $ac_cv_lib_error_at_line = no; then
+  LIBOBJS="$LIBOBJS error.$ac_objext"
+fi
+
 
 
 for ac_func in mkstemp setlocale
 
 
 for ac_func in mkstemp setlocale
index 616d29bbd88a2d3feab017bf058514d16777e7d3..a549bb9b3a6972a4ef2a652be1c057ae4c42e25f 100644 (file)
@@ -80,6 +80,8 @@ AM_C_PROTOTYPES
 
 # Checks for library functions.
 AC_FUNC_ALLOCA
 
 # Checks for library functions.
 AC_FUNC_ALLOCA
+AC_FUNC_OBSTACK
+AC_FUNC_ERROR_AT_LINE
 AC_CHECK_FUNCS(mkstemp setlocale)
 AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
 AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr)
 AC_CHECK_FUNCS(mkstemp setlocale)
 AC_CHECK_DECLS([stpcpy, strndup, strnlen, memchr])
 AC_REPLACE_FUNCS(stpcpy strndup strnlen strspn memchr)
index bda16e0ff085b7483816e8f35e1615a9e2697ec6..cdd1961307cb88c756999cf8f779e5addb47794f 100644 (file)
@@ -12,9 +12,7 @@ INCLUDES = -I.. -I$(srcdir) -I../intl
 EXTRA_DIST = malloc.c realloc.c
 
 libbison_a_SOURCES = \
 EXTRA_DIST = malloc.c realloc.c
 
 libbison_a_SOURCES = \
-  error.c error.h \
   getopt.h getopt.c getopt1.c \
   getopt.h getopt.c getopt1.c \
-  obstack.h obstack.c \
   quote.h quote.c quotearg.h quotearg.c \
   xalloc.h xmalloc.c xstrdup.c
 
   quote.h quote.c quotearg.h quotearg.c \
   xalloc.h xmalloc.c xstrdup.c
 
index 0c9339ab7a5b5652a9a84cf27adfc4fb7010d392..b2c64aa4d25e37ebd3b41c29148d912efa6913e5 100644 (file)
@@ -113,9 +113,7 @@ INCLUDES = -I.. -I$(srcdir) -I../intl
 EXTRA_DIST = malloc.c realloc.c
 
 libbison_a_SOURCES = \
 EXTRA_DIST = malloc.c realloc.c
 
 libbison_a_SOURCES = \
-  error.c error.h \
   getopt.h getopt.c getopt1.c \
   getopt.h getopt.c getopt1.c \
-  obstack.h obstack.c \
   quote.h quote.c quotearg.h quotearg.c \
   xalloc.h xmalloc.c xstrdup.c
 
   quote.h quote.c quotearg.h quotearg.c \
   xalloc.h xmalloc.c xstrdup.c
 
@@ -129,9 +127,9 @@ CONFIG_CLEAN_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
 
 libbison_a_AR = $(AR) cru
 LIBRARIES = $(noinst_LIBRARIES)
 
 libbison_a_AR = $(AR) cru
-am_libbison_a_OBJECTS = error$U.$(OBJEXT) getopt$U.$(OBJEXT) \
-       getopt1$U.$(OBJEXT) obstack$U.$(OBJEXT) quote$U.$(OBJEXT) \
-       quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) xstrdup$U.$(OBJEXT)
+am_libbison_a_OBJECTS = getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) \
+       quote$U.$(OBJEXT) quotearg$U.$(OBJEXT) xmalloc$U.$(OBJEXT) \
+       xstrdup$U.$(OBJEXT)
 libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
 
 DEFS = @DEFS@
 libbison_a_OBJECTS = $(am_libbison_a_OBJECTS)
 
 DEFS = @DEFS@
@@ -140,10 +138,10 @@ CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/error$U.Po \
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/alloca.Po $(DEPDIR)/error.Po \
 @AMDEP_TRUE@   $(DEPDIR)/getopt$U.Po $(DEPDIR)/getopt1$U.Po \
 @AMDEP_TRUE@   $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
 @AMDEP_TRUE@   $(DEPDIR)/getopt$U.Po $(DEPDIR)/getopt1$U.Po \
 @AMDEP_TRUE@   $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
-@AMDEP_TRUE@   $(DEPDIR)/obstack$U.Po $(DEPDIR)/quote$U.Po \
+@AMDEP_TRUE@   $(DEPDIR)/obstack.Po $(DEPDIR)/quote$U.Po \
 @AMDEP_TRUE@   $(DEPDIR)/quotearg$U.Po $(DEPDIR)/realloc.Po \
 @AMDEP_TRUE@   $(DEPDIR)/stpcpy.Po $(DEPDIR)/strndup.Po \
 @AMDEP_TRUE@   $(DEPDIR)/strnlen.Po $(DEPDIR)/strspn.Po \
 @AMDEP_TRUE@   $(DEPDIR)/quotearg$U.Po $(DEPDIR)/realloc.Po \
 @AMDEP_TRUE@   $(DEPDIR)/stpcpy.Po $(DEPDIR)/strndup.Po \
 @AMDEP_TRUE@   $(DEPDIR)/strnlen.Po $(DEPDIR)/strspn.Po \
@@ -155,8 +153,8 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 CFLAGS = @CFLAGS@
 DIST_SOURCES = $(libbison_a_SOURCES)
 DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
 CFLAGS = @CFLAGS@
 DIST_SOURCES = $(libbison_a_SOURCES)
 DIST_COMMON = Makefile.am Makefile.in alloca.c ansi2knr.1 ansi2knr.c \
-       malloc.c memchr.c realloc.c stpcpy.c strndup.c strnlen.c \
-       strspn.c
+       error.c error.h malloc.c memchr.c obstack.c obstack.h realloc.c \
+       stpcpy.c strndup.c strnlen.c strspn.c
 SOURCES = $(libbison_a_SOURCES)
 
 all: all-am
 SOURCES = $(libbison_a_SOURCES)
 
 all: all-am
@@ -196,12 +194,12 @@ mostlyclean-kr:
        -test "$U" = "" || rm -f *_.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
        -test "$U" = "" || rm -f *_.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
index ce70fa62a8f433ce0bd91cdb6a0106edcf4ac181..f8fc184211f80a2b130be0931c74fedd8a10871a 100644 (file)
@@ -211,9 +211,9 @@ skeleton_find (const char *envvar, const char *skeleton_name)
   if (!res)
     {
       /* Skeleton file name without path */
   if (!res)
     {
       /* Skeleton file name without path */
-      const char *skel_name = strrchr(skeleton_name, '/');
+      const char *skel_name = strrchr (skeleton_name, '/');
       if (!skel_name)
       if (!skel_name)
-        skel_name = strrchr(skeleton_name, '\\');
+        skel_name = strrchr (skeleton_name, '\\');
       if (!skel_name)
         skel_name = skeleton_name;
       else
       if (!skel_name)
         skel_name = skeleton_name;
       else