X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=config-ml.in;h=16885f95f0e16a95118128171123c15f93257048;hb=625bfde66084a35c76984479eea4debb219d384d;hp=d4e7fe63bae8e3f214b217c88a09aed017fa8ada;hpb=2968054bf6e59f61e39c532c2a54f3037d8b4ff8;p=pf3gnuchains%2Fgcc-fork.git diff --git a/config-ml.in b/config-ml.in index d4e7fe63bae..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,11 +771,12 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then break fi done - ml_config_env='CC="${CC_} $flags" CXX="${CXX_} $flags"' + ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" GCJ="${GCJ_}$flags"' if [ "${with_target_subdir}" = "." ]; then - CC_=$CC - CXX_=$CXX + CC_=$CC' ' + CXX_=$CXX' ' + GCJ_=$GCJ' ' else # Create a regular expression that matches any string as long # as ML_POPDIR. @@ -786,6 +805,51 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then 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} \