X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=configure.ac;h=233ce0a768e2f898ca3c20e4d15bd236a0cc8e2b;hb=cf92e749fe51822798b44e0396aeb7d785544498;hp=bbb82c338048b3d54a7b52d7382b7a89152ab208;hpb=120721515b4b7393db8c90fdb9b4151bb5394e17;p=pf3gnuchains%2Fgcc-fork.git diff --git a/configure.ac b/configure.ac index bbb82c33804..233ce0a768e 100644 --- a/configure.ac +++ b/configure.ac @@ -1621,8 +1621,9 @@ AC_ARG_WITH(boot-ldflags, AC_SUBST(poststage1_ldflags) # Check for PPL -ppllibs=" -lppl_c -lppl -lgmpxx" +ppllibs= pplinc= +pwllib= AC_ARG_WITH(ppl, [AS_HELP_STRING([--with-ppl=PATH], @@ -1636,45 +1637,65 @@ AC_ARG_WITH(ppl-lib, [AS_HELP_STRING([--with-ppl-lib=PATH], [specify directory for the installed PPL library])]) -case $with_ppl in - no) - ppllibs= - ;; - "" | yes) +AC_ARG_ENABLE(ppl-version-check, +[AS_HELP_STRING([--disable-ppl-version-check], + [disable check for PPL version])]) + +case $with_ppl in + yes | no | "") ;; *) - ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx" + ppllibs="-L$with_ppl/lib" pplinc="-I$with_ppl/include $pplinc" + if test -d "$with_ppl/lib" && test -d "$with_ppl/include"; then + with_ppl=yes + else + AC_MSG_ERROR([cannot find directories "$with_ppl/lib" or "$with_ppl/include"]) + fi ;; esac -if test "x$with_ppl_include" != x; then + +if test x"$with_ppl_include" != x; then pplinc="-I$with_ppl_include $pplinc" + with_ppl=yes fi + if test "x$with_ppl_lib" != x; then - ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx" + ppllibs="-L$with_ppl_lib" + with_ppl=yes fi -if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then - ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"' -lppl_c -lppl -lgmpxx ' + +if test x"$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then + if test x"$enable_watchdog" = xyes; then + pwllib="-lpwl" + fi + ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir" pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C ' enable_ppl_version_check=no + with_ppl=yes fi -AC_ARG_ENABLE(ppl-version-check, -[AS_HELP_STRING([--disable-ppl-version-check], - [disable check for PPL version])], -ENABLE_PPL_CHECK=$enableval, -ENABLE_PPL_CHECK=yes) +if test "x$with_ppl" != xno; then + if test "x$pwllib" = x; then + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $ppllibs" + AC_CHECK_LIB(pwl,PWL_handle_timeout,[pwllib="-lpwl"]) + LDFLAGS="$saved_LDFLAGS" + fi -if test "x$with_ppl" != "xno" -a "${ENABLE_PPL_CHECK}" = "yes"; then - saved_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pplinc $gmpinc" - AC_MSG_CHECKING([for version 0.10 (or later revision) of PPL]) - AC_TRY_COMPILE([#include "ppl_c.h"],[ - #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10 - choke me - #endif - ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) - CFLAGS="$saved_CFLAGS" + ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx" + + if test "$enable_ppl_version_check" != no; then + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pplinc $gmpinc" + AC_MSG_CHECKING([for version 0.11 (revision 0 or later) of PPL]) + AC_TRY_COMPILE([#include "ppl_c.h"],[ + #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 11 + choke me + #endif + ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ; with_ppl=no ]) + CFLAGS="$saved_CFLAGS" + fi fi # Flags needed for PPL @@ -1688,6 +1709,11 @@ dnl Provide configure switches and initialize clooginc & clooglibs dnl with user input. CLOOG_INIT_FLAGS if test "x$with_ppl" = "xno"; then + dnl Only execute fail-action, if CLooG has been requested. + CLOOG_REQUESTED([graphite_requested=yes], [graphite_requested=no]) + if test "${graphite_requested}" = yes; then + AC_MSG_ERROR([Unable to find a usable PPL. See config.log for details.]) + fi with_cloog=no fi if test "x${with_cloog}" = x && test "x${with_cloog_include}" = x \ @@ -1702,10 +1728,9 @@ if test "x$with_cloog" != "xno"; then dnl ignored. CLOOG_CHECK_VERSION(0,16,1) - dnl Only execute fail-action, if CLooG has been - dnl requested. + dnl Only execute fail-action, if CLooG has been requested. CLOOG_IF_FAILED([ - AC_MSG_ERROR([Unable to find a usable CLooG. See config.log for details.])]) + AC_MSG_ERROR([Unable to find a usable CLooG. See config.log for details.])]) fi # Check for LTO support. @@ -2841,6 +2866,7 @@ AC_SUBST_FILE(serialization_dependencies) # Also strip program-prefix, program-suffix, and program-transform-name, # so that we can pass down a consistent program-transform-name. baseargs= +tbaseargs= keep_next=no skip_next=no eval "set -- $ac_configure_args" @@ -2856,6 +2882,7 @@ do ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac baseargs="$baseargs '$ac_arg'" + tbaseargs="$tbaseargs '$ac_arg'" keep_next=no continue fi @@ -2877,11 +2904,45 @@ do ;; esac + skip_targ=no + case $ac_arg in +changequote(,) + --with-* | --without-*) + libopt=`echo "$ac_arg" | sed -e 's,^--[^-_]*[-_],,' -e 's,=.*$,,'` + + case $libopt in + *[-_]include) + lib=`echo "$libopt" | sed 's,[-_]include$,,'` + ;; + *[-_]lib) + lib=`echo "$libopt" | sed 's,[-_]lib$,,'` + ;; + *) + lib=$libopt + ;; + esac +changequote([,]) + + case $lib in + mpc | mpfr | gmp | ppl | cloog) + # If we're processing --with-$lib, --with-$lib-include or + # --with-$lib-lib, for one of the libs above, and target is + # different from host, don't pass the current argument to any + # target library's configure. + if test x$is_cross_compiler = xyes; then + skip_targ=yes + fi + ;; + esac + ;; + esac + case "$ac_arg" in --cache-file=/dev/null | \ -cache-file=/dev/null ) # Handled here to avoid the test to skip args below. baseargs="$baseargs '$ac_arg'" + tbaseargs="$tbaseargs '$ac_arg'" # Assert: $separate_arg should always be no. keep_next=$separate_arg ;; @@ -2912,6 +2973,9 @@ do ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac baseargs="$baseargs '$ac_arg'" + if test X"$skip_targ" = Xno; then + tbaseargs="$tbaseargs '$ac_arg'" + fi keep_next=$separate_arg ;; *) @@ -2938,10 +3002,13 @@ EOF_SED gcc_transform_name=`cat conftestsed.out` rm -f conftestsed.out baseargs="$baseargs --program-transform-name='${gcc_transform_name}'" +tbaseargs="$tbaseargs --program-transform-name='${gcc_transform_name}'" if test "$silent" = yes; then baseargs="$baseargs --silent" + tbaseargs="$tbaseargs --silent" fi baseargs="$baseargs --disable-option-checking" +tbaseargs="$tbaseargs --disable-option-checking" # Record and document user additions to sub configure arguments. AC_ARG_VAR([build_configargs], @@ -2970,7 +3037,7 @@ esac # This seems to be due to autoconf 2.5x stupidity. host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}" -target_configargs="$target_configargs ${baseargs}" +target_configargs="$target_configargs ${tbaseargs}" # Passing a --with-cross-host argument lets the target libraries know # whether they are being built with a cross-compiler or being built