summaryrefslogtreecommitdiff
path: root/libada/configure.ac
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-22 05:50:34 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-22 05:50:34 +0000
commitd75c8768e4bd8050bd5b9481e75be4fee296e918 (patch)
tree260a0b0b3732fa1041ab8a426415ec76bd3798bf /libada/configure.ac
parentf81424362ed2c19415d5c09343737a8c799b47b7 (diff)
downloadgcc-d75c8768e4bd8050bd5b9481e75be4fee296e918.tar.gz
2008-09-22 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r140542 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@140543 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libada/configure.ac')
-rw-r--r--libada/configure.ac48
1 files changed, 48 insertions, 0 deletions
diff --git a/libada/configure.ac b/libada/configure.ac
index b0a46d00332..c456e17d00a 100644
--- a/libada/configure.ac
+++ b/libada/configure.ac
@@ -49,6 +49,54 @@ AC_ARG_ENABLE([maintainer-mode],
[MAINT='#'])
AC_SUBST([MAINT])dnl
+AC_CANONICAL_SYSTEM
+target_alias=${target_alias-$host_alias}
+
+AM_ENABLE_MULTILIB(, ..)
+# Calculate toolexeclibdir
+# Also toolexecdir, though it's only used in toolexeclibdir
+case ${enable_version_specific_runtime_libs} in
+ yes)
+ # Need the gcc compiler version to know where to install libraries
+ # and header files if --enable-version-specific-runtime-libs option
+ # is selected.
+ toolexecdir='$(libdir)/gcc/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
+ ;;
+ no)
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ # Install a library built with a cross compiler in tooldir, not libdir.
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
+ else
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
+ fi
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+ esac
+ ;;
+esac
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
+#TODO: toolexeclibdir is currently disregarded
+
+# Check the compiler.
+# The same as in boehm-gc and libstdc++. Have to borrow it from there.
+# We must force CC to /not/ be precious variables; otherwise
+# the wrong, non-multilib-adjusted value will be used in multilibs.
+# As a side effect, we have to subst CFLAGS ourselves.
+
+m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
+m4_define([_AC_ARG_VAR_PRECIOUS],[])
+AC_PROG_CC
+m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+
+AC_SUBST(CFLAGS)
+
AC_ARG_ENABLE([shared],
[AC_HELP_STRING([--disable-shared],
[don't provide a shared libgnat])],