configure
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jun 10 22:10:40 2008 +0000 (2008-06-10)
changeset 552 4edbcdb17e3d
parent 444 de5067d2fa4f
child 553 b2261f6f9bc2
permissions -rwxr-xr-x
Vampirise patches for gcc-4.3.{0,1} from gentoo. Absolutely untested...

/trunk/patches/gcc/4.3.0/275-gcc-x86-emit-cld.patch | 156 156 0 0 +
/trunk/patches/gcc/4.3.0/450-gcc4-noteGNUstack.patch | 198 198 0 0 +
/trunk/patches/gcc/4.3.0/550-gcc43-pr25343.patch | 21 21 0 0 +
/trunk/patches/gcc/4.3.0/375-gcc43-pr35440.patch | 59 59 0 0 +
/trunk/patches/gcc/4.3.0/125-gcc-trampolinewarn.patch | 35 35 0 0 +
/trunk/patches/gcc/4.3.0/475-gcc43-pr35705.patch | 21 21 0 0 +
/trunk/patches/gcc/4.3.0/700-204-uclibc-locale-wchar_fix.patch | 51 51 0 0 +
/trunk/patches/gcc/4.3.0/775-303-c99-complex-ugly-hack.patch | 14 14 0 0 +
/trunk/patches/gcc/4.3.0/575-sh-pr24836.patch | 28 28 0 0 +
/trunk/patches/gcc/4.3.0/675-203-uclibc-locale-no__x.patch | 224 224 0 0 +
/trunk/patches/gcc/4.3.0/400-gcc43-pr24170.patch | 61 61 0 0 +
/trunk/patches/gcc/4.3.0/100-gcc-4.1-alpha-mieee-default.patch | 34 34 0 0 +
/trunk/patches/gcc/4.3.0/825-305-libmudflap-susv3-legacy.patch | 49 49 0 0 +
/trunk/patches/gcc/4.3.0/175-gcc-4.1-cross-compile.patch | 44 44 0 0 +
/trunk/patches/gcc/4.3.0/850-306-libstdc++-namespace.patch | 38 38 0 0 +
/trunk/patches/gcc/4.3.0/200-gcc-netbsd-symbolic.patch | 14 14 0 0 +
/trunk/patches/gcc/4.3.0/750-301-missing-execinfo_h.patch | 13 13 0 0 +
/trunk/patches/gcc/4.3.0/225-gcc-sparc64-bsd.patch | 30 30 0 0 +
/trunk/patches/gcc/4.3.0/350-300-libstdc++-pic.patch | 56 56 0 0 +
/trunk/patches/gcc/4.3.0/500-gcc43-pr34571.patch | 35 35 0 0 +
/trunk/patches/gcc/4.3.0/300-gcc-3.4-libiberty-pic.patch | 12 12 0 0 +
/trunk/patches/gcc/4.3.0/625-103-uclibc-conf-noupstream.patch | 13 13 0 0 +
/trunk/patches/gcc/4.3.0/425-gcc4-ia64-noteGNUstack.patch | 96 96 0 0 +
/trunk/patches/gcc/4.3.0/325-gcc4-superh-default-multilib.patch | 25 25 0 0 +
/trunk/patches/gcc/4.3.0/725-205-uclibc-locale-update.patch | 355 355 0 0 ++
/trunk/patches/gcc/4.3.0/800-304-index_macro.patch | 27 27 0 0 +
/trunk/patches/gcc/4.3.0/600-gcc-ca-translation-typo.patch | 19 19 0 0 +
/trunk/patches/gcc/4.3.0/650-200-uclibc-locale.patch | 2794 2794 0 0 +++++++++++++++
/trunk/patches/gcc/4.3.0/525-gcc43-pr35982.patch | 23 23 0 0 +
/trunk/patches/gcc/4.3.0/150-gcc43-java-nomulti.patch | 47 47 0 0 +
/trunk/patches/gcc/4.3.0/250-904-flatten-switch-stmt-00.patch | 76 76 0 0 +
/trunk/patches/gcc/4.3.1/100-gcc-4.1-alpha-mieee-default.patch | 34 34 0 0 +
/trunk/patches/gcc/4.3.1/500-103-uclibc-conf-noupstream.patch | 13 13 0 0 +
/trunk/patches/gcc/4.3.1/175-gcc-4.1-cross-compile.patch | 44 44 0 0 +
/trunk/patches/gcc/4.3.1/400-gcc4-noteGNUstack.patch | 198 198 0 0 +
/trunk/patches/gcc/4.3.1/600-205-uclibc-locale-update.patch | 355 355 0 0 ++
/trunk/patches/gcc/4.3.1/725-306-libstdc++-namespace.patch | 38 38 0 0 +
/trunk/patches/gcc/4.3.1/350-gcc43-pr24170.patch | 61 61 0 0 +
/trunk/patches/gcc/4.3.1/300-gcc4-superh-default-multilib.patch | 25 25 0 0 +
/trunk/patches/gcc/4.3.1/575-204-uclibc-locale-wchar_fix.patch | 51 51 0 0 +
/trunk/patches/gcc/4.3.1/200-gcc-netbsd-symbolic.patch | 14 14 0 0 +
/trunk/patches/gcc/4.3.1/225-gcc-sparc64-bsd.patch | 30 30 0 0 +
/trunk/patches/gcc/4.3.1/450-gcc43-pr25343.patch | 21 21 0 0 +
/trunk/patches/gcc/4.3.1/625-301-missing-execinfo_h.patch | 13 13 0 0 +
/trunk/patches/gcc/4.3.1/325-300-libstdc++-pic.patch | 56 56 0 0 +
/trunk/patches/gcc/4.3.1/425-gcc43-pr34571.patch | 35 35 0 0 +
/trunk/patches/gcc/4.3.1/375-gcc4-ia64-noteGNUstack.patch | 96 96 0 0 +
/trunk/patches/gcc/4.3.1/125-gcc-trampolinewarn.patch | 35 35 0 0 +
/trunk/patches/gcc/4.3.1/275-gcc-3.4-libiberty-pic.patch | 12 12 0 0 +
/trunk/patches/gcc/4.3.1/650-303-c99-complex-ugly-hack.patch | 14 14 0 0 +
/trunk/patches/gcc/4.3.1/525-200-uclibc-locale.patch | 2794 2794 0 0 +++++++++++++++
/trunk/patches/gcc/4.3.1/550-203-uclibc-locale-no__x.patch | 224 224 0 0 +
/trunk/patches/gcc/4.3.1/150-gcc43-java-nomulti.patch | 47 47 0 0 +
/trunk/patches/gcc/4.3.1/700-305-libmudflap-susv3-legacy.patch | 49 49 0 0 +
/trunk/patches/gcc/4.3.1/675-304-index_macro.patch | 27 27 0 0 +
/trunk/patches/gcc/4.3.1/250-904-flatten-switch-stmt-00.patch | 76 76 0 0 +
/trunk/patches/gcc/4.3.1/475-sh-pr24836.patch | 28 28 0 0 +
57 files changed, 9058 insertions(+)
     1 #!/bin/sh
     2 
     3 VERSION=$(cat .version)
     4 DATE=$(date +%Y%m%d)
     5 
     6 PREFIX_DEFAULT=/usr/local
     7 
     8 BINDIR_set=
     9 LIBDIR_set=
    10 DOCDIR_set=
    11 MANDIR_set=
    12 LOCAL_set=
    13 
    14 get_optval(){
    15     local ret
    16     case "$1" in
    17         --*=?*)
    18             echo "${1}" |cut -d '=' -f 2-
    19             ret=0
    20             ;;
    21         *)
    22             echo "${2}"
    23             ret=1
    24             ;;
    25     esac
    26     return ${ret}
    27 }
    28 
    29 set_prefix() {
    30     PREFIX=$(get_optval "$1" "$2")
    31     return $?
    32 }
    33 
    34 set_bindir() {
    35     BINDIR_set=1
    36     BINDIR=$(get_optval "$1" "$2")
    37     return $?
    38 }
    39 
    40 set_libdir() {
    41     LIBDIR_set=1
    42     LIBDIR=$(get_optval "$1" "$2")
    43     return $?
    44 }
    45 
    46 set_docdir() {
    47     DOCDIR_set=1
    48     DOCDIR=$(get_optval "$1" "$2")
    49     return $?
    50 }
    51 
    52 set_mandir() {
    53     MANDIR_set=1
    54     MANDIR=$(get_optval "$1" "$2")
    55     return $?
    56 }
    57 
    58 do_help() {
    59     cat <<__EOF__
    60 \`configure' configures crosstool-NG ${VERSION} to adapt to many kind of systems.
    61 
    62 USAGE: ./configure [OPTION]...
    63 
    64 Defaults for the options are specified in brackets.
    65 
    66 Configuration:
    67   -h, --help              display this help and exit                                                                                                                  
    68   --prefix=PREFIX         install files in PREFIX [${PREFIX_DEFAULT}]
    69   --local                 don't install, and use current directory
    70 
    71 By default, \`make install' will install all the files in
    72 \`${PREFIX_DEFAULT}/bin', \`${PREFIX_DEFAULT}/lib' etc.  You can specify
    73 an installation prefix other than \`${PREFIX_DEFAULT}' using \`--prefix',
    74 for instance \`--prefix=\${HOME}'.
    75 
    76 For better control, use the options below.
    77 
    78 Fine tuning of the installation directories:
    79   --bindir=DIR           user executables [PREFIX/bin]
    80   --libdir=DIR           object code libraries [PREFIX/lib]
    81   --docdir=DIR           info documentation [PREFIX/share/doc]
    82   --mandir=DIR           man documentation [PREFIX/share/man]
    83 __EOF__
    84 }
    85 
    86 do_error() {
    87     echo "[ERROR] ${@}"
    88     exit 1
    89 }
    90 
    91 #---------------------------------------------------------------------
    92 # Set user's options
    93 
    94 while [ $# -ne 0 ]; do
    95     case "$1" in
    96         --prefix*)  set_prefix "$1" "$2" && shift || shift 2;;
    97         --bindir*)  set_bindir "$1" "$2" && shift || shift 2;;
    98         --libdir*)  set_libdir "$1" "$2" && shift || shift 2;;
    99         --docdir*)  set_docdir "$1" "$2" && shift || shift 2;;
   100         --mandir*)  set_mandir "$1" "$2" && shift || shift 2;;
   101         --local)    LOCAL_set=1; shift;;
   102         --help|-h)  do_help; exit 0;;
   103         *)          do_help; exit 1;;
   104     esac
   105 done
   106 
   107 [ -z "${PREFIX}" ] && set_prefix "" "${PREFIX_DEFAULT}"
   108 if [ "${LOCAL_set}" = "1" ]; then
   109     set_prefix "" $(pwd)
   110     set_bindir "" $(pwd)
   111     set_libdir "" $(pwd)
   112     set_docdir "" $(pwd)/docs
   113     set_mandir "" $(pwd)/docs
   114 fi
   115 
   116 [ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin"
   117 [ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}"
   118 [ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}"
   119 [ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1"
   120 
   121 #---------------------------------------------------------------------
   122 # Some sanity checks, now
   123 
   124 # If this version is a svn snapshot, try to get the revision number
   125 # If we can't get the revision number, use date
   126 case "${VERSION}" in
   127   *+svn)
   128     REVISION=$(LC_ALL=C svnversion)
   129     case "${REVISION}" in
   130       exported)
   131         VERSION="${VERSION}:unknown@$(date +%Y%m%d.%H%M%S)";;
   132       *)
   133         URL=$(LC_ALL=C svn info 2>/dev/null |egrep 'URL: ' |cut -d ' ' -f 2-)
   134         ROOT=$(LC_ALL=C svn info 2>/dev/null |egrep 'Repository Root: ' |cut -d ' ' -f 3-)
   135         VERSION="${VERSION}:${URL#${ROOT}}@${REVISION}"
   136         ;;
   137     esac
   138     ;;
   139 esac
   140 
   141 # Check bash is present, and at least version 3.0
   142 [ -x /bin/bash ] || do_error "bash 3.0 or above was not found in /bin/bash"
   143 bash_version=$(/bin/bash -c 'echo ${BASH_VERSION}')
   144 bash_major=$(/bin/bash -c 'echo ${BASH_VERSINFO[0]}')
   145 [ ${bash_major} -ge 3 ] || do_error "bash 3.0 or above is needed (/bin/bash is ${bash_version})"
   146 
   147 sed -r -e "s,@@BINDIR@@,${BINDIR},g;"   \
   148        -e "s,@@LIBDIR@@,${LIBDIR},g;"   \
   149        -e "s,@@DOCDIR@@,${DOCDIR},g;"   \
   150        -e "s,@@MANDIR@@,${MANDIR},g;"   \
   151        -e "s,@@VERSION@@,${VERSION},g;" \
   152        -e "s,@@DATE@@,${DATE},g;"       \
   153        -e "s,@@LOCAL@@,${LOCAL_set},g;" \
   154        Makefile.in >Makefile
   155 
   156 cat <<__EOF__
   157 crosstool-NG configured as follows:
   158   PREFIX="${PREFIX}"
   159   BINDIR="${BINDIR}"
   160   LIBDIR="${LIBDIR}"
   161   DOCDIR="${DOCDIR}"
   162   MANDIR="${MANDIR}"
   163 __EOF__