X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=config-ml.in;h=16885f95f0e16a95118128171123c15f93257048;hb=116b271d255dcb1ad7449c859a0661b64bf5f296;hp=e5ca10ec1db1a5c1cfc4e0b0c22a5f88804d7342;hpb=bae203e7ff4da8f9fdeb11233de73ad300d412b6;p=pf3gnuchains%2Fgcc-fork.git diff --git a/config-ml.in b/config-ml.in index e5ca10ec1db..16885f95f0e 100644 --- a/config-ml.in +++ b/config-ml.in @@ -17,8 +17,6 @@ # . ${srcdir}/../config-ml.in # fi # -# See librx/configure.in in the libg++ distribution for an example of how -# to handle autoconf'd libraries. # # Things are complicated because 6 separate cases must be handled: # 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6. @@ -30,13 +28,10 @@ # The build tree is layed out as # # ./ -# libg++ # newlib # m68020/ -# libg++ # newlib # m68881/ -# libg++ # newlib # # The nice feature about this arrangement is that inter-library references @@ -156,7 +151,7 @@ done if [ "${enable_multilib}" = yes ]; then # Compute whether this is the library's top level directory -# (ie: not a multilib subdirectory, and not a subdirectory like libg++/src). +# (ie: not a multilib subdirectory, and not a subdirectory like newlib/src). # ${with_multisubdir} tells us we're in the right branch, but we could be # in a subdir of that. # ??? The previous version could void this test by separating the process into @@ -397,6 +392,28 @@ mips*-*-*) esac ;; powerpc*-*-* | rs6000*-*-*) + if [ x$enable_aix64 = xno ] + then + old_multidirs="${multidirs}" + multidirs="" + for x in ${old_multidirs}; do + case "$x" in + *ppc64* ) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi + if [ x$enable_pthread = xno ] + then + old_multidirs="${multidirs}" + multidirs="" + for x in ${old_multidirs}; do + case "$x" in + *pthread* ) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi if [ x$enable_softfloat = xno ] then old_multidirs="${multidirs}" @@ -531,6 +548,7 @@ multi-do: CFLAGS="$(CFLAGS) $${flags}" \ prefix="$(prefix)" \ exec_prefix="$(exec_prefix)" \ + GCJFLAGS="$(GCJFLAGS) $${flags}" \ CXXFLAGS="$(CXXFLAGS) $${flags}" \ LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ @@ -720,7 +738,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then ;; *) case "${srcdir}" in - /*) # absolute path + /* | [A-Za-z]:[\\/]* ) # absolute path ml_newsrcdir=${srcdir} ;; *) # otherwise relative @@ -733,7 +751,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then esac case "${progname}" in - /*) ml_recprog=${progname} ;; + /* | [A-Za-z]:[\\/]* ) ml_recprog=${progname} ;; *) ml_recprog=${dotdot}${progname} ;; esac @@ -753,7 +771,86 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then break fi done - ml_config_env='CC="${CC} $flags"' + ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"' + + if [ "${with_target_subdir}" = "." ]; then + CC_=$CC' ' + CXX_=$CXX' ' + GCJ_=$GCJ' ' + else + # Create a regular expression that matches any string as long + # as ML_POPDIR. + popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'` + CC_= + for arg in ${CC}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;; + "${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) + CC_="${CC_}${arg} " ;; + esac + done + + CXX_= + for arg in ${CXX}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + "${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) + CXX_="${CXX_}${arg} " ;; + esac + done + + GCJ_= + for arg in ${GCJ}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + "${ML_POPDIR}"/*) + GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) + GCJ_="${GCJ_}${arg} " ;; + esac + done + + if test "x${LD_LIBRARY_PATH+set}" = xset; then + LD_LIBRARY_PATH_= + for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do + case "$arg" in + "${ML_POPDIR}"/*) + arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` + ;; + esac + if test "x$LD_LIBRARY_PATH_" != x; then + LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg + else + LD_LIBRARY_PATH_=$arg + fi + done + ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_" + fi + + if test "x${SHLIB_PATH+set}" = xset; then + SHLIB_PATH_= + for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do + case "$arg" in + "${ML_POPDIR}"/*) + arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` + ;; + esac + if test "x$SHLIB_PATH_" != x; then + SHLIB_PATH_=$SHLIB_PATH_:$arg + else + SHLIB_PATH_=$arg + fi + done + ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_" + fi + fi if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \