X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libdecnumber%2Fconfigure;h=35baf0798bc9fee63df5d6a4ca5fd6e298b1c243;hb=52fe4420b771a0f3b4fc7c6535bbd6e9b279f775;hp=636839cf369d22b54ccefea4736008d6188b44f7;hpb=0b51ce00751290f667de07ef28240a5af946bd91;p=deliverable%2Fbinutils-gdb.git diff --git a/libdecnumber/configure b/libdecnumber/configure index 636839cf36..35baf0798b 100755 --- a/libdecnumber/configure +++ b/libdecnumber/configure @@ -593,6 +593,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +PICFLAG ADDITIONAL_OBJS enable_decimal_float target_os @@ -670,6 +671,7 @@ enable_option_checking enable_werror_always enable_maintainer_mode enable_decimal_float +enable_host_shared ' ac_precious_vars='build_alias host_alias @@ -1301,6 +1303,7 @@ Optional Features: enable decimal float extension to C. Selecting 'bid' or 'dpd' choses which decimal floating point format to use + --enable-host-shared build host code as shared libraries Some influential environment variables: CC C compiler command @@ -2220,6 +2223,29 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_aux_dir= +for ac_dir in .. "$srcdir"/..; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + # Checks for programs. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 @@ -3246,11 +3272,23 @@ test -n "$AUTOHEADER" || AUTOHEADER="$MISSING autoheader" # See config/warnings.m4 for details. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + WARN_CFLAGS= save_CFLAGS="$CFLAGS" -for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ +for real_option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ -Wmissing-prototypes -Wold-style-definition \ -Wmissing-format-attribute -Wcast-qual; do + # Do the check with the no- prefix removed since gcc silently + # accepts any -Wno-* option on purpose + case $real_option in + -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;; + *) option=$real_option ;; + esac as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 @@ -3282,20 +3320,34 @@ eval ac_res=\$$as_acx_Woption { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : - WARN_CFLAGS="$WARN_CFLAGS${WARN_CFLAGS:+ }$option" + WARN_CFLAGS="$WARN_CFLAGS${WARN_CFLAGS:+ }$real_option" fi done CFLAGS="$save_CFLAGS" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu WARN_PEDANTIC= +# Do the check with the no- prefix removed from the warning options +# since gcc silently accepts any -Wno-* option on purpose if test "$GCC" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long" >&5 -$as_echo_n "checking whether $CC supports -pedantic -Wno-long-long... " >&6; } -if test "${acx_cv_prog_cc_pedantic__Wno_long_long+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wlong-long" >&5 +$as_echo_n "checking whether $CC supports -pedantic -Wlong-long... " >&6; } +if test "${acx_cv_prog_cc_pedantic__Wlong_long+set}" = set; then : $as_echo_n "(cached) " >&6 else save_CFLAGS="$CFLAGS" -CFLAGS="-pedantic -Wno-long-long" +CFLAGS="-pedantic -Wlong-long" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3308,24 +3360,36 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - acx_cv_prog_cc_pedantic__Wno_long_long=yes + acx_cv_prog_cc_pedantic__Wlong_long=yes else - acx_cv_prog_cc_pedantic__Wno_long_long=no + acx_cv_prog_cc_pedantic__Wlong_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long" >&5 -$as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long" >&6; } -if test $acx_cv_prog_cc_pedantic__Wno_long_long = yes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wlong_long" >&5 +$as_echo "$acx_cv_prog_cc_pedantic__Wlong_long" >&6; } +if test $acx_cv_prog_cc_pedantic__Wlong_long = yes; then : WARN_PEDANTIC="$WARN_PEDANTIC${WARN_PEDANTIC:+ }-pedantic -Wno-long-long" fi fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Only enable with --enable-werror-always until existing warnings are # corrected. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + WERROR= # Check whether --enable-werror-always was given. if test "${enable_werror_always+set}" = set; then : @@ -3338,6 +3402,12 @@ if test $enable_werror_always = yes; then : WERROR="$WERROR${WERROR:+ }-Werror" fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + # Checks for header files. @@ -4450,29 +4520,6 @@ else fi -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 @@ -4594,7 +4641,7 @@ $as_echo_n "checking for decimal floating point... " >&6; } if test "${enable_decimal_float+set}" = set; then : enableval=$enable_decimal_float; case $enable_decimal_float in - yes | no | bid | dpd) ;; + yes | no | bid | dpd) default_decimal_float=$enable_decimal_float ;; *) as_fn_error "'$enable_decimal_float' is an invalid value for --enable-decimal-float. Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;; esac @@ -4602,12 +4649,15 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'." "$LINENO" 5 ;; else case $target in - powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux*) + powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \ + i?86*-*-elfiamcu | i?86*-*-gnu* | \ + i?86*-*-mingw* | x86_64*-*-mingw* | \ + i?86*-*-cygwin* | x86_64*-*-cygwin*) enable_decimal_float=yes ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5 -$as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target, ignored" >&5 +$as_echo "$as_me: WARNING: decimal float is not supported for this target, ignored" >&2;} enable_decimal_float=no ;; esac @@ -4626,17 +4676,21 @@ case x$enable_decimal_float in enable_decimal_float=dpd ;; esac + default_decimal_float=$enable_decimal_float ;; xno) # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper # dependency on libdecnumber. - enable_decimal_float=dpd + default_decimal_float=dpd ;; esac +# Use default_decimal_float for dependency. +enable_decimal_float=$default_decimal_float + # If BID is being used, additional objects should be linked in. if test x$enable_decimal_float = xbid; then ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(bid_OBJS)" @@ -4874,6 +4928,16 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac +# Enable --enable-host-shared. +# Check whether --enable-host-shared was given. +if test "${enable_host_shared+set}" = set; then : + enableval=$enable_host_shared; PICFLAG=-fPIC +else + PICFLAG= +fi + + + # Output. ac_config_headers="$ac_config_headers config.h:config.in"