Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Mar 6th, 2011  |  syntax: None  |  size: 3.76 KB  |  hits: 43  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. AC_DEFUN([GLIBCXX_CONFIGURE], [
  2.   # Keep these sync'd with the list in Makefile.am.  The first provides an
  3.   # expandable list at autoconf time; the second provides an expandable list
  4.   # (i.e., shell variable) at configure time.
  5.   m4_define([glibcxx_SUBDIRS],[include libmath libsupc++ src doc po testsuite])
  6.   SUBDIRS='glibcxx_SUBDIRS'
  7.  
  8.   # These need to be absolute paths, yet at the same time need to
  9.   # canonicalize only relative paths, because then amd will not unmount
  10.   # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
  11.   glibcxx_builddir=`${PWDCMD-pwd}`
  12.   case $srcdir in
  13.     [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
  14.     *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
  15.   esac
  16.   toplevel_srcdir=${glibcxx_srcdir}/..
  17.   AC_SUBST(glibcxx_builddir)
  18.   AC_SUBST(glibcxx_srcdir)
  19.   AC_SUBST(toplevel_srcdir)
  20.  
  21.   # We use these options to decide which functions to include.  They are
  22.   # set from the top level.
  23.   AC_ARG_WITH([target-subdir],
  24.     AC_HELP_STRING([--with-target-subdir=SUBDIR],
  25.                    [configuring in a subdirectory]))
  26.  
  27.   AC_ARG_WITH([cross-host],
  28.     AC_HELP_STRING([--with-cross-host=HOST],
  29.                    [configuring with a cross compiler]))
  30.  
  31.   AC_ARG_WITH([newlib],
  32.     AC_HELP_STRING([--with-newlib],
  33.                    [assume newlib as a system C library]))
  34.  
  35.   # We're almost certainly being configured before anything else which uses
  36.   # C++, so all of our AC_PROG_* discoveries will be cached.  It's vital that
  37.   # we not cache the value of CXX that we "discover" here, because it's set
  38.   # to something unique for us and libjava.  Other target libraries need to
  39.   # find CXX for themselves.  We yank the rug out from under the normal AC_*
  40.   # process by sneakily renaming the cache variable.  This also lets us debug
  41.   # the value of "our" CXX in postmortems.
  42.   #
  43.   # We must also force CXX to /not/ be a precious variable, otherwise the
  44.   # wrong (non-multilib-adjusted) value will be used in multilibs.  This
  45.   # little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS.  And as a side
  46.   # effect, CXXFLAGS is no longer automagically subst'd, so we have to do
  47.   # that ourselves.  Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
  48.   #
  49.   # -fno-builtin must be present here so that a non-conflicting form of
  50.   # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
  51.  
  52.   m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
  53.   m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
  54.   m4_define([_AC_ARG_VAR_PRECIOUS],[])
  55.   save_CXXFLAGS="$CXXFLAGS"
  56.   CXXFLAGS="$CXXFLAGS -fno-builtin"
  57.   AC_PROG_CC
  58.   AC_PROG_CXX
  59.   CXXFLAGS="$save_CXXFLAGS"
  60.   m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
  61.   AC_SUBST(CFLAGS)
  62.   AC_SUBST(CXXFLAGS)
  63.  
  64.   # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
  65.   # available).  Uncomment the next line to force a particular method.
  66.   AC_PROG_LN_S
  67.   #LN_S='cp -p'
  68.  
  69.   AC_CHECK_TOOL(AS, as)
  70.   AC_CHECK_TOOL(AR, ar)
  71.   AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
  72.  
  73.   AM_MAINTAINER_MODE
  74.  
  75.   # Set up safe default values for all subsequent AM_CONDITIONAL tests
  76.   # which are themselves conditionally expanded.
  77.   ## (Right now, this only matters for enable_wchar_t, but nothing prevents
  78.   ## other macros from doing the same.  This should be automated.)  -pme
  79.   need_libmath=no
  80.  
  81.   # Check for uClibc since Linux platforms use different configuration
  82.   # directories depending on the C library in use.
  83.   AC_EGREP_CPP([_using_uclibc], [
  84.   #include <stdio.h>
  85.   #if __UCLIBC__
  86.     _using_uclibc
  87.   #endif
  88.   ], uclibc=yes, uclibc=no)
  89.  
  90.   # Find platform-specific directories containing configuration info.
  91.   # Also possibly modify flags used elsewhere, as needed by the platform.
  92.   GLIBCXX_CHECK_HOST
  93. ])