re PR other/26473 (cross-building installs ssp headers to $(includedir))

PR 26473
	* configure.ac (ACX_NONCANONICAL_TARGET): Use it.
	* Makefile.am (target_noncanonical): Define.
	(libsubincludedir): New variable.
	(nobase_libsubinclude_HEADERS): Likewise.
	(nobase_include_HEADERS): Remove.
	* configure: Regenerated.
	* Makefile.in: Likewise.
	* aclocal.m4: Regenerated.

From-SVN: r111501
This commit is contained in:
Mark Mitchell 2006-02-28 00:41:19 +00:00 committed by Mark Mitchell
parent 36b2c8f2ce
commit f2b5129c6d
6 changed files with 62 additions and 24 deletions

View File

@ -1,3 +1,15 @@
2006-02-27 Mark Mitchell <mark@codesourcery.com>
PR 26473
* configure.ac (ACX_NONCANONICAL_TARGET): Use it.
* Makefile.am (target_noncanonical): Define.
(libsubincludedir): New variable.
(nobase_libsubinclude_HEADERS): Likewise.
(nobase_include_HEADERS): Remove.
* configure: Regenerated.
* Makefile.in: Likewise.
* aclocal.m4: Regenerated.
2006-01-20 Richard Guenther <rguenther@suse.de>
* configure.ac: Use -fPIC for symbol versioning test.

View File

@ -23,7 +23,9 @@ AM_CFLAGS = -Wall
toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
nobase_include_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
target_noncanonical = @target_noncanonical@
libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
libssp_la_SOURCES = \
ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \

View File

@ -40,7 +40,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = $(am__configure_deps) $(nobase_include_HEADERS) \
DIST_COMMON = $(am__configure_deps) $(nobase_libsubinclude_HEADERS) \
$(srcdir)/../compile $(srcdir)/../config.guess \
$(srcdir)/../config.sub $(srcdir)/../depcomp \
$(srcdir)/../install-sh $(srcdir)/../ltmain.sh \
@ -50,7 +50,8 @@ DIST_COMMON = $(am__configure_deps) $(nobase_include_HEADERS) \
$(top_srcdir)/ssp/ssp.h.in ChangeLog
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@ -67,7 +68,7 @@ am__vpath_adj = case $$p in \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
"$(DESTDIR)$(includedir)"
"$(DESTDIR)$(libsubincludedir)"
toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
am_libssp_la_OBJECTS = ssp.lo gets-chk.lo memcpy-chk.lo memmove-chk.lo \
@ -96,8 +97,8 @@ MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
nobase_includeHEADERS_INSTALL = $(install_sh_DATA)
HEADERS = $(nobase_include_HEADERS)
nobase_libsubincludeHEADERS_INSTALL = $(install_sh_DATA)
HEADERS = $(nobase_libsubinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -204,6 +205,7 @@ sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_noncanonical = @target_noncanonical@
target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
@ -220,7 +222,8 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
@LIBSSP_USE_SYMVER_TRUE@version_dep = $(srcdir)/ssp.map
AM_CFLAGS = -Wall
toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
nobase_include_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
libssp_la_SOURCES = \
ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \
memset-chk.c snprintf-chk.c sprintf-chk.c stpcpy-chk.c \
@ -450,24 +453,24 @@ distclean-multi:
maintainer-clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
uninstall-info-am:
install-nobase_includeHEADERS: $(nobase_include_HEADERS)
install-nobase_libsubincludeHEADERS: $(nobase_libsubinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
test -z "$(libsubincludedir)" || $(mkdir_p) "$(DESTDIR)$(libsubincludedir)"
@$(am__vpath_adj_setup) \
list='$(nobase_include_HEADERS)'; for p in $$list; do \
list='$(nobase_libsubinclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__vpath_adj) \
echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
$(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
echo " $(nobase_libsubincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libsubincludedir)/$$f'"; \
$(nobase_libsubincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libsubincludedir)/$$f"; \
done
uninstall-nobase_includeHEADERS:
uninstall-nobase_libsubincludeHEADERS:
@$(NORMAL_UNINSTALL)
@$(am__vpath_adj_setup) \
list='$(nobase_include_HEADERS)'; for p in $$list; do \
list='$(nobase_libsubinclude_HEADERS)'; for p in $$list; do \
$(am__vpath_adj) \
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \
echo " rm -f '$(DESTDIR)$(libsubincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(libsubincludedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@ -649,7 +652,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) all-multi $(HEADERS) config.h
installdirs:
for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(includedir)"; do \
for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(libsubincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
@ -698,7 +701,7 @@ info: info-am
info-am:
install-data-am: install-nobase_includeHEADERS
install-data-am: install-nobase_libsubincludeHEADERS
install-exec-am: install-multi install-toolexeclibLTLIBRARIES
@ -728,7 +731,7 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS \
uninstall-am: uninstall-info-am uninstall-nobase_libsubincludeHEADERS \
uninstall-toolexeclibLTLIBRARIES
.PHONY: CTAGS GTAGS all all-am all-multi am--refresh check check-am \
@ -741,13 +744,13 @@ uninstall-am: uninstall-info-am uninstall-nobase_includeHEADERS \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-multi \
install-nobase_includeHEADERS install-strip \
install-nobase_libsubincludeHEADERS install-strip \
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
maintainer-clean-multi mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool mostlyclean-multi pdf \
pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \
uninstall-nobase_includeHEADERS \
uninstall-nobase_libsubincludeHEADERS \
uninstall-toolexeclibLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.

1
libssp/aclocal.m4 vendored
View File

@ -914,6 +914,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
m4_include([../config/lead-dot.m4])
m4_include([../libtool.m4])

22
libssp/configure vendored
View File

@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT multi_basedir CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CFLAGS CPP CPPFLAGS LIBSSP_USE_SYMVER_TRUE LIBSSP_USE_SYMVER_FALSE EGREP ssp_have_usable_vsnprintf LN_S RANLIB ac_ct_RANLIB LIBTOOL enable_shared enable_static toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT multi_basedir CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CFLAGS CPP CPPFLAGS LIBSSP_USE_SYMVER_TRUE LIBSSP_USE_SYMVER_FALSE EGREP ssp_have_usable_vsnprintf LN_S RANLIB ac_ct_RANLIB LIBTOOL enable_shared enable_static toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1422,6 +1422,23 @@ test -n "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
case ${build_alias} in
"") build_noncanonical=${build} ;;
*) build_noncanonical=${build_alias} ;;
esac
case ${host_alias} in
"") host_noncanonical=${build_noncanonical} ;;
*) host_noncanonical=${host_alias} ;;
esac
case ${target_alias} in
"") target_noncanonical=${host_noncanonical} ;;
*) target_noncanonical=${target_alias} ;;
esac
am__api_version="1.9"
# Find a good install program. We prefer a C program (faster),
@ -4847,7 +4864,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 4850 "configure"' > conftest.$ac_ext
echo '#line 4867 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -5850,6 +5867,7 @@ s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@target_noncanonical@,$target_noncanonical,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t

View File

@ -1,10 +1,12 @@
# Process this file with autoconf to produce a configure script, like so:
# aclocal && autoconf && autoheader && automake
#
# aclocal -I .. -I ../config && autoconf && autoheader && automake
AC_PREREQ(2.59)
AC_INIT(libssp, 1.0)
AC_CONFIG_SRCDIR(ssp.c)
AC_CANONICAL_SYSTEM
ACX_NONCANONICAL_TARGET
AM_INIT_AUTOMAKE