X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=aa29d534ff5d4faafa9a776e74d94bada217bf47;hb=e47911ce2145c3efd181bffc191cf38c7271177c;hp=c96f630d32bf8c88ee71b93c983cbf7520241c44;hpb=7142fb32472b5c68d126d194755e49dfa52b776b;p=gcc.git diff --git a/configure.ac b/configure.ac index c96f630d32b..aa29d534ff5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,6 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -# 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, +# Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -25,6 +26,34 @@ m4_include(config/proginstall.m4) AC_INIT(move-if-change) AC_PREREQ(2.59) +progname=$0 +# if PWD already has a value, it is probably wrong. +if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi + +# Export original configure arguments for use by sub-configures. +# Quote arguments with shell meta charatcers. +TOPLEVEL_CONFIGURE_ARGUMENTS= +set -- "$progname" "$@" +for ac_arg +do + case "$ac_arg" in + *" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + # if the argument is of the form -foo=baz, quote the baz part only + ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;; + *) ;; + esac + # Add the quoted argument to the list. + TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg" +done +if test "$silent" = yes; then + TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent" +fi +# Remove the initial space we just introduced and, as these will be +# expanded by make, quote '$'. +TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'` +AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS) + # Find the build, host, and target systems. ACX_NONCANONICAL_BUILD ACX_NONCANONICAL_HOST @@ -84,34 +113,6 @@ esac config_shell=${CONFIG_SHELL-/bin/sh} -progname=$0 -# if PWD already has a value, it is probably wrong. -if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi - -# Export original configure arguments for use by sub-configures. -# Quote arguments with shell meta charatcers. -TOPLEVEL_CONFIGURE_ARGUMENTS= -set -- "$progname" "$@" -for ac_arg -do - case "$ac_arg" in - *" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - # if the argument is of the form -foo=baz, quote the baz part only - ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;; - *) ;; - esac - # Add the quoted argument to the list. - TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg" -done -if test "$silent" = yes; then - TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent" -fi -# Remove the initial space we just introduced and, as these will be -# expanded by make, quote '$'. -TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'` -AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS) - moveifchange=${srcdir}/move-if-change srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` @@ -157,7 +158,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix # these libraries are used by various programs built for the host environment # -host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr" +host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -317,7 +318,7 @@ if test "${ENABLE_GOLD}" = "yes"; then if test "$is_elf" = "yes"; then # Check for target supported by gold. case "${target}" in - i?86-*-* | x86_64-*-*) + i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-*) configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" ;; esac @@ -446,7 +447,7 @@ case "${target}" in noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; powerpc-*-darwin* | i[[3456789]]86-*-darwin* | x86_64-*-darwin9*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof" + noconfigdirs="$noconfigdirs ld gas gdb gprof" noconfigdirs="$noconfigdirs sim target-rda" ;; *-*-darwin*) @@ -563,7 +564,6 @@ case "${target}" in ;; arm*-*-linux-gnueabi) noconfigdirs="$noconfigdirs target-qthreads" - noconfigdirs="$noconfigdirs target-libobjc" case ${with_newlib} in no) noconfigdirs="$noconfigdirs target-newlib target-libgloss" esac @@ -1067,10 +1067,18 @@ case "${host}" in # without overflowing the jump tables (-J says to use a 32 bit table) tentative_cc="cc -J" ;; - *-hp-hpux*) + hppa*-hp-hpux10*) + tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-pa-hpux10" + ;; + hppa*-hp-hpux* | hppa*-*-hiux*) tentative_cc="cc -Wp,-H256000" + host_makefile_frag="config/mh-pa" ;; - *-*-hiux*) + hppa*-*) + host_makefile_frag="config/mh-pa" + ;; + *-hp-hpux* | *-*-hiux*) tentative_cc="cc -Wp,-H256000" ;; rs6000-*-lynxos*) @@ -1302,6 +1310,115 @@ fi AC_SUBST(gmplibs) AC_SUBST(gmpinc) + +# Check for PPL +ppl_major_version=0 +ppl_minor_version=10 +ppllibs= +pplinc= + +AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package + Equivalent to --with-ppl-include=PATH/include + plus --with-ppl-lib=PATH/lib]) +AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files]) +AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library]) + +if test "x$with_ppl" != x; then + ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx" + pplinc="-I$with_ppl/include $pplinc" + LIBS="$ppllibs $LIBS" +fi +if test "x$with_ppl_include" != x; then + pplinc="-I$with_ppl_include $pplinc" +fi +if test "x$with_ppl_lib" != x; then + ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx" + LIBS="$ppllibs $LIBS" +fi +if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then + ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/.libs -L$$r/$(HOST_SUBDIR)/ppl/_libs -lppl_c -lppl -lgmpxx ' + pplinc='-I$$r/$(HOST_SUBDIR)/ppl/include -I$$s/ppl/include ' + LIBS="$ppllibs $LIBS" +fi + +AC_ARG_ENABLE(ppl-version-check, +[ --disable-ppl-version-check disable check for PPL version], +ENABLE_PPL_CHECK=$enableval, +ENABLE_PPL_CHECK=yes) + +if test "${ENABLE_PPL_CHECK}" = "yes"; then + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pplinc $gmpinc" + AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL]) + AC_TRY_COMPILE([#include "ppl_c.h"],[ + #if PPL_VERSION_MAJOR != $ppl_major_version || PPL_VERSION_MINOR != $ppl_minor_version + choke me + #endif + ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); ppllibs= ; pplinc= ]) + CFLAGS="$saved_CFLAGS" +fi + +# Flags needed for PPL +AC_SUBST(ppllibs) +AC_SUBST(pplinc) + + +# Check for CLOOG +clooglibs=" -lcloog " +clooginc=" -DCLOOG_PPL_BACKEND " + +AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package + Equivalent to --with-cloog-include=PATH/include + plus --with-cloog-lib=PATH/lib]) +AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files]) +AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library]) +AC_ARG_WITH(cloog-polylib, [ --with-cloog-polylib=PATH Specify prefix directory for the installed CLooG-PolyLib package]) + +if test "x$with_cloog" != x; then + clooglibs="-L$with_cloog/lib -lcloog" + clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND " + LIBS="$clooglibs $LIBS" +fi +if test "x$with_cloog_polylib" != x; then + clooglibs="-L$with_cloog/lib -lcloog" + clooginc="-I$with_cloog/include " + LIBS="$clooglibs $LIBS" +fi +if test "x$with_cloog_include" != x; then + clooginc="-I$with_cloog_include -DCLOOG_PPL_BACKEND " +fi +if test "x$with_cloog_lib" != x; then + clooglibs="-L$with_cloog_lib -lcloog" + LIBS="$clooglibs $LIBS" +fi +if test "x$with_cloog$with_cloog_include$with_cloog_lib" = x && test -d ${srcdir}/cloog; then + clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/.libs -L$$r/$(HOST_SUBDIR)/cloog/_libs -lcloog ' + clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -DCLOOG_PPL_BACKEND ' + LIBS="$clooglibs $LIBS" +fi + +AC_ARG_ENABLE(cloog-version-check, +[ --disable-cloog-version-check disable check for CLooG version], +ENABLE_CLOOG_CHECK=$enableval, +ENABLE_CLOOG_CHECK=yes) + +if test "${ENABLE_CLOOG_CHECK}" = "yes"; then + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc" + AC_MSG_CHECKING([for correct version of CLooG]) + AC_TRY_COMPILE([#include "cloog/cloog.h"],[ + #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 + choke me + #endif + ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ]) + CFLAGS="$saved_CFLAGS" +fi + +# Flags needed for CLOOG +AC_SUBST(clooglibs) +AC_SUBST(clooginc) + + # By default, C is the only stage 1 language. stage1_languages=,c, @@ -1896,6 +2013,9 @@ case "${target}" in mipsisa*-*-elfoabi*) target_makefile_frag="config/mt-mips-elfoabi" ;; + mips*-*-*linux* | mips*-*-gnu*) + target_makefile_frag="config/mt-mips-gnu" + ;; *-*-netware*) target_makefile_frag="config/mt-netware" ;; @@ -2039,12 +2159,23 @@ case "${host}" in ;; esac +# Decide which environment variable is used to find dynamic libraries. case "${host}" in *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; + *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;; *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; esac +# On systems where the dynamic library environment variable is PATH, +# gcc/ will put dynamic libraries into a subdirectory to avoid adding +# built executables to PATH. +if test "$RPATH_ENVVAR" = PATH; then + GCC_SHLIB_SUBDIR=/shlib +else + GCC_SHLIB_SUBDIR= +fi + # Record target_configdirs and the configure arguments for target and # build configuration in Makefile. target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` @@ -2502,6 +2633,7 @@ AC_SUBST_FILE(ospace_frag) # Miscellanea: directories, flags, etc. AC_SUBST(RPATH_ENVVAR) +AC_SUBST(GCC_SHLIB_SUBDIR) AC_SUBST(tooldir) AC_SUBST(build_tooldir) AC_SUBST(CONFIGURE_GDB_TK)