diff options
Diffstat (limited to 'contrib/binutils/libiberty/configure')
-rwxr-xr-x | contrib/binutils/libiberty/configure | 351 |
1 files changed, 335 insertions, 16 deletions
diff --git a/contrib/binutils/libiberty/configure b/contrib/binutils/libiberty/configure index ed7423a006e7..0312cc418d29 100755 --- a/contrib/binutils/libiberty/configure +++ b/contrib/binutils/libiberty/configure @@ -847,6 +847,7 @@ Optional Features: --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-multilib build many library versions (default) --enable-install-libiberty Install headers for end users Optional Packages: @@ -1727,6 +1728,29 @@ else fi +# Add --enable-multilib to configure. +# Default to --enable-multilib +# Check whether --enable-multilib or --disable-multilib was given. +if test "${enable_multilib+set}" = set; then + enableval="$enable_multilib" + case "$enableval" in + yes) multilib=yes ;; + no) multilib=no ;; + *) { { echo "$as_me:$LINENO: error: bad value $enableval for multilib option" >&5 +echo "$as_me: error: bad value $enableval for multilib option" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + multilib=yes +fi; + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling = no && test $multilib = yes \ + && test "x${with_multisubdir}" != x ; then + cross_compiling=maybe +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2929,22 +2953,33 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_c_preproc_warn_flag=yes -# Warn C++ incompatibilities if supported. -echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5 -echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then +ac_libiberty_warn_cflags= +save_CFLAGS="$CFLAGS" +for option in -W -Wall -Wwrite-strings -Wc++-compat \ + -Wstrict-prototypes; do + as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` + + echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 +echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6 +if eval "test \"\${$as_acx_Woption+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - save_CFLAGS="$CFLAGS" - CFLAGS="-Wc++-compat" - cat >conftest.$ac_ext <<_ACEOF + CFLAGS="$option" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +int +main () +{ + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -2968,29 +3003,91 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_w_cxx_compat=yes + eval "$as_acx_Woption=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_w_cxx_compat=no +eval "$as_acx_Woption=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6 +echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6 + if test `eval echo '${'$as_acx_Woption'}'` = yes; then + ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option" +fi + + done +CFLAGS="$save_CFLAGS" + +if test "$GCC" = yes; then + echo "$as_me:$LINENO: checking whether $CC supports -pedantic " >&5 +echo $ECHO_N "checking whether $CC supports -pedantic ... $ECHO_C" >&6 +if test "${acx_cv_prog_cc_pedantic_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" +CFLAGS="-pedantic " +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ -if test x$GCC = xyes; then - ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes' + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + acx_cv_prog_cc_pedantic_=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +acx_cv_prog_cc_pedantic_=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$save_CFLAGS" fi -if test $ac_cv_prog_cc_w_cxx_compat = yes ; then - ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat" +echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic_" >&5 +echo "${ECHO_T}$acx_cv_prog_cc_pedantic_" >&6 +if test $acx_cv_prog_cc_pedantic_ = yes; then + ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic " fi +fi + + + if test "x$CC" != xcc; then echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 @@ -5679,6 +5776,208 @@ _ACEOF fi + # If we are being configured for Mingw, we know which functions + # Mingw provides and which ones we will be expected to provide. + + case "${host}" in + *-*-mingw*) + case $LIBOBJS in + "asprintf.$ac_objext" | \ + *" asprintf.$ac_objext" | \ + "asprintf.$ac_objext "* | \ + *" asprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;; +esac + + case $LIBOBJS in + "basename.$ac_objext" | \ + *" basename.$ac_objext" | \ + "basename.$ac_objext "* | \ + *" basename.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;; +esac + + case $LIBOBJS in + "bcmp.$ac_objext" | \ + *" bcmp.$ac_objext" | \ + "bcmp.$ac_objext "* | \ + *" bcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;; +esac + + case $LIBOBJS in + "bcopy.$ac_objext" | \ + *" bcopy.$ac_objext" | \ + "bcopy.$ac_objext "* | \ + *" bcopy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;; +esac + + case $LIBOBJS in + "bzero.$ac_objext" | \ + *" bzero.$ac_objext" | \ + "bzero.$ac_objext "* | \ + *" bzero.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;; +esac + + case $LIBOBJS in + "clock.$ac_objext" | \ + *" clock.$ac_objext" | \ + "clock.$ac_objext "* | \ + *" clock.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;; +esac + + case $LIBOBJS in + "ffs.$ac_objext" | \ + *" ffs.$ac_objext" | \ + "ffs.$ac_objext "* | \ + *" ffs.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;; +esac + + case $LIBOBJS in + "getpagesize.$ac_objext" | \ + *" getpagesize.$ac_objext" | \ + "getpagesize.$ac_objext "* | \ + *" getpagesize.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;; +esac + + case $LIBOBJS in + "index.$ac_objext" | \ + *" index.$ac_objext" | \ + "index.$ac_objext "* | \ + *" index.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS index.$ac_objext" ;; +esac + + case $LIBOBJS in + "insque.$ac_objext" | \ + *" insque.$ac_objext" | \ + "insque.$ac_objext "* | \ + *" insque.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;; +esac + + case $LIBOBJS in + "mempcpy.$ac_objext" | \ + *" mempcpy.$ac_objext" | \ + "mempcpy.$ac_objext "* | \ + *" mempcpy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;; +esac + + case $LIBOBJS in + "mkstemps.$ac_objext" | \ + *" mkstemps.$ac_objext" | \ + "mkstemps.$ac_objext "* | \ + *" mkstemps.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;; +esac + + case $LIBOBJS in + "random.$ac_objext" | \ + *" random.$ac_objext" | \ + "random.$ac_objext "* | \ + *" random.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS random.$ac_objext" ;; +esac + + case $LIBOBJS in + "rindex.$ac_objext" | \ + *" rindex.$ac_objext" | \ + "rindex.$ac_objext "* | \ + *" rindex.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;; +esac + + case $LIBOBJS in + "sigsetmask.$ac_objext" | \ + *" sigsetmask.$ac_objext" | \ + "sigsetmask.$ac_objext "* | \ + *" sigsetmask.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;; +esac + + case $LIBOBJS in + "stpcpy.$ac_objext" | \ + *" stpcpy.$ac_objext" | \ + "stpcpy.$ac_objext "* | \ + *" stpcpy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;; +esac + + case $LIBOBJS in + "stpncpy.$ac_objext" | \ + *" stpncpy.$ac_objext" | \ + "stpncpy.$ac_objext "* | \ + *" stpncpy.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;; +esac + + case $LIBOBJS in + "strndup.$ac_objext" | \ + *" strndup.$ac_objext" | \ + "strndup.$ac_objext "* | \ + *" strndup.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;; +esac + + case $LIBOBJS in + "strverscmp.$ac_objext" | \ + *" strverscmp.$ac_objext" | \ + "strverscmp.$ac_objext "* | \ + *" strverscmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;; +esac + + case $LIBOBJS in + "vasprintf.$ac_objext" | \ + *" vasprintf.$ac_objext" | \ + "vasprintf.$ac_objext "* | \ + *" vasprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;; +esac + + case $LIBOBJS in + "waitpid.$ac_objext" | \ + *" waitpid.$ac_objext" | \ + "waitpid.$ac_objext "* | \ + *" waitpid.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;; +esac + + + for f in $funcs; do + case "$f" in + asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid) + ;; + *) + n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >>confdefs.h <<_ACEOF +#define $n 1 +_ACEOF + + ;; + esac + done + + # Mingw doesnt provide any of the variables in $vars, so we + # dont have to check them here. + + # Of the functions in $checkfuncs, Mingw only has strerror. + cat >>confdefs.h <<\_ACEOF +#define HAVE_STRERROR 1 +_ACEOF + + + setobjs=yes + ;; + + esac + # We may wish to install the target headers somewhere. # Check whether --enable-install-libiberty or --disable-install-libiberty was given. if test "${enable_install_libiberty+set}" = set; then @@ -5840,6 +6139,26 @@ _ACEOF setobjs=yes ;; + *-*-msdosdjgpp) + for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \ + getcwd getpagesize getrusage gettimeofday gettimeofday \ + index insque memchr memcmp memcpy memmove memset psignal \ + putenv random rename rindex sbrk setenv stpcpy strcasecmp \ + strchr strdup strerror strncasecmp strrchr strstr strtod \ + strtol strtoul sysconf times tmpnam vfprintf vprintf \ + vsprintf waitpid + do + n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >>confdefs.h <<_ACEOF +#define $n 1 +_ACEOF + + done + + + setobjs=yes + ;; + esac fi |