Commit b3e1e64f by Michael Sokolov Committed by Michael Sokolov

aclocal.m4 (gcc_AC_FUNC_STRSTR): New macro.

	* aclocal.m4 (gcc_AC_FUNC_STRSTR): New macro.
	* configure.in (gcc_AC_FUNC_STRSTR): Add invokation.
	* configure, config.in: Regenerate.
	* Makefile.in (STRSTR, HOST_STRSTR, USE_HOST_STRSTR): New variables.
	(LIBDEPS, HOST_LIBDEPS, LIBS, HOST_LIBS): Add strstr handling.
	(strstr.o, $(HOST_PREFIX_1)strstr.o): New rules.
	(doprint.o): New rule.

From-SVN: r39160
parent 5baf8c37
2001-01-20 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* aclocal.m4 (gcc_AC_FUNC_STRSTR): New macro.
* configure.in (gcc_AC_FUNC_STRSTR): Add invokation.
* configure, config.in: Regenerate.
* Makefile.in (STRSTR, HOST_STRSTR, USE_HOST_STRSTR): New variables.
(LIBDEPS, HOST_LIBDEPS, LIBS, HOST_LIBS): Add strstr handling.
(strstr.o, $(HOST_PREFIX_1)strstr.o): New rules.
(doprint.o): New rule.
2001-01-20 Joseph S. Myers <jsm28@cam.ac.uk> 2001-01-20 Joseph S. Myers <jsm28@cam.ac.uk>
* c-typeck.c (digest_init): Handle boolean types as scalars. * c-typeck.c (digest_init): Handle boolean types as scalars.
......
...@@ -373,6 +373,7 @@ GGC_LIB= ...@@ -373,6 +373,7 @@ GGC_LIB=
# Configure will set these if you need vfprintf and possibly _doprnt support. # Configure will set these if you need vfprintf and possibly _doprnt support.
VFPRINTF=@vfprintf@ VFPRINTF=@vfprintf@
DOPRINT=@doprint@ DOPRINT=@doprint@
STRSTR=@strstr@
# Specify the rule for actually making libgcc.a, # Specify the rule for actually making libgcc.a,
LIBGCC = libgcc.a LIBGCC = libgcc.a
...@@ -518,6 +519,7 @@ HOST_MALLOC=$(MALLOC) ...@@ -518,6 +519,7 @@ HOST_MALLOC=$(MALLOC)
HOST_OBSTACK=$(OBSTACK) HOST_OBSTACK=$(OBSTACK)
HOST_VFPRINTF=$(VFPRINTF) HOST_VFPRINTF=$(VFPRINTF)
HOST_DOPRINT=$(DOPRINT) HOST_DOPRINT=$(DOPRINT)
HOST_STRSTR=$(STRSTR)
# Actual name to use when installing a native compiler. # Actual name to use when installing a native compiler.
GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t` GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
...@@ -614,25 +616,27 @@ USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC ...@@ -614,25 +616,27 @@ USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC
USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac ` USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
USE_HOST_VFPRINTF= ` case "${HOST_VFPRINTF}" in ?*) echo ${HOST_PREFIX}${HOST_VFPRINTF} ;; esac ` USE_HOST_VFPRINTF= ` case "${HOST_VFPRINTF}" in ?*) echo ${HOST_PREFIX}${HOST_VFPRINTF} ;; esac `
USE_HOST_DOPRINT= ` case "${HOST_DOPRINT}" in ?*) echo ${HOST_PREFIX}${HOST_DOPRINT} ;; esac ` USE_HOST_DOPRINT= ` case "${HOST_DOPRINT}" in ?*) echo ${HOST_PREFIX}${HOST_DOPRINT} ;; esac `
USE_HOST_STRSTR= ` case "${HOST_STRSTR}" in ?*) echo ${HOST_PREFIX}${HOST_STRSTR} ;; esac `
# Dependency on obstack, alloca, malloc or whatever library facilities # Dependency on obstack, alloca, malloc or whatever library facilities
# are not installed in the system libraries. # are not installed in the system libraries.
# We don't use USE_ALLOCA because backquote expansion doesn't work in deps. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
LIBDEPS= $(INTLLIBS) $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) LIBDEPS= $(INTLLIBS) $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(STRSTR)
# Likewise, for use in the tools that must run on this machine # Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC. # even if we are cross-building GCC.
# We don't use USE_ALLOCA because backquote expansion doesn't work in deps. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT) HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT) $(HOST_PREFIX)$(HOST_STRSTR)
# How to link with both our special library facilities # How to link with both our special library facilities
# and the system's installed libraries. # and the system's installed libraries.
LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(INTLLIBS) @LIBS@ $(VFPRINTF) $(DOPRINT) $(CLIB) ../libiberty/libiberty.a LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(INTLLIBS) @LIBS@ $(VFPRINTF) $(DOPRINT) $(STRSTR) $(CLIB) ../libiberty/libiberty.a
# Likewise, for use in the tools that must run on this machine # Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC. # even if we are cross-building GCC.
HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \ HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) \
$(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) $(HOST_CLIB) $(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) $(USE_HOST_STRSTR) \
$(HOST_CLIB)
HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o \ HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o \
$(HOST_PREFIX)ggc-none.o gensupport.o hashtab.o safe-ctype.o $(HOST_PREFIX)ggc-none.o gensupport.o hashtab.o safe-ctype.o
...@@ -1207,6 +1211,16 @@ vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(GCONFIG_H) system.h ...@@ -1207,6 +1211,16 @@ vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(GCONFIG_H) system.h
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) \ $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) \
vfprintf.c $(OUTPUT_OPTION) vfprintf.c $(OUTPUT_OPTION)
doprint.o: $(srcdir)/doprint.c $(GCONFIG_H) system.h
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/doprint.c $(OUTPUT_OPTION)
strstr.o: $(srcdir)/../libiberty/strstr.c $(GCONFIG_H) system.h
rm -f strstr.c
$(LN_S) $(srcdir)/../libiberty/strstr.c strstr.c
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) \
strstr.c $(OUTPUT_OPTION)
splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \ splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \
$(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h $(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h
rm -f splay-tree.c rm -f splay-tree.c
...@@ -1840,6 +1854,11 @@ $(HOST_PREFIX_1)doprint.o: doprint.c ...@@ -1840,6 +1854,11 @@ $(HOST_PREFIX_1)doprint.o: doprint.c
sed -e 's/config[.]h/hconfig.h/' $(srcdir)/doprint.c > $(HOST_PREFIX)doprint.c sed -e 's/config[.]h/hconfig.h/' $(srcdir)/doprint.c > $(HOST_PREFIX)doprint.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)doprint.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)doprint.c
$(HOST_PREFIX_1)strstr.o: $(srcdir)/../libiberty/strstr.c
rm -f $(HOST_PREFIX)strstr.c
sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/strstr.c > $(HOST_PREFIX)strstr.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)strstr.c
$(HOST_PREFIX_1)malloc.o: malloc.c $(HOST_PREFIX_1)malloc.o: malloc.c
rm -f $(HOST_PREFIX)malloc.c rm -f $(HOST_PREFIX)malloc.c
sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
......
...@@ -69,6 +69,11 @@ AC_SUBST(vfprintf) ...@@ -69,6 +69,11 @@ AC_SUBST(vfprintf)
AC_SUBST(doprint) AC_SUBST(doprint)
]) ])
dnl Check if we have strstr.
AC_DEFUN([gcc_AC_FUNC_STRSTR],
[AC_CHECK_FUNCS([strstr], [strstr=], [strstr=strstr.o])
AC_SUBST([strstr])])
dnl See if the printf functions in libc support %p in format strings. dnl See if the printf functions in libc support %p in format strings.
AC_DEFUN(gcc_AC_FUNC_PRINTF_PTR, AC_DEFUN(gcc_AC_FUNC_PRINTF_PTR,
[AC_CACHE_CHECK(whether the printf functions support %p, [AC_CACHE_CHECK(whether the printf functions support %p,
......
...@@ -201,6 +201,9 @@ ...@@ -201,6 +201,9 @@
/* Define if you have the strsignal function. */ /* Define if you have the strsignal function. */
#undef HAVE_STRSIGNAL #undef HAVE_STRSIGNAL
/* Define if you have the strstr function. */
#undef HAVE_STRSTR
/* Define if you have the strtoul function. */ /* Define if you have the strtoul function. */
#undef HAVE_STRTOUL #undef HAVE_STRTOUL
......
...@@ -566,6 +566,7 @@ fi ...@@ -566,6 +566,7 @@ fi
AC_SUBST(TARGET_GETGROUPS_T) AC_SUBST(TARGET_GETGROUPS_T)
gcc_AC_FUNC_VFPRINTF_DOPRNT gcc_AC_FUNC_VFPRINTF_DOPRNT
gcc_AC_FUNC_STRSTR
gcc_AC_FUNC_PRINTF_PTR gcc_AC_FUNC_PRINTF_PTR
case "${host}" in case "${host}" in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment