Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: config/binutils/binutils.in
- ===================================================================
- --- config/binutils/binutils.in (revision 265)
- +++ config/binutils/binutils.in (working copy)
- @@ -11,6 +11,11 @@
- # Don't remove next line
- # CT_INSERT_VERSION_BELOW
- +config BINUTILS_V_2_24
- + bool
- + prompt "2.24 (EXPERIMENTAL)"
- + depends on EXPERIMENTAL
- +
- config BINUTILS_V_2_23_2
- bool
- prompt "2.23.2 (EXPERIMENTAL)"
- @@ -76,6 +81,7 @@
- string
- # Don't remove next line
- # CT_INSERT_VERSION_STRING_BELOW
- + default "2.24" if BINUTILS_V_2_24
- default "2.23.2" if BINUTILS_V_2_23_2
- default "2.23.1" if BINUTILS_V_2_23_1
- default "2.22" if BINUTILS_V_2_22
- @@ -86,6 +92,12 @@
- default "2.18a" if BINUTILS_V_2_18a
- default "custom" if BINUTILS_CUSTOM
- +config BINUTILS_2_24_or_later
- + bool
- + select BINUTILS_2_23_or_later
- + select BINUTILS_HAS_GOLD
- + select BINUTILS_HAS_PLUGINS
- +
- config BINUTILS_2_23_or_later
- bool
- select BINUTILS_2_22_or_later
- Index: config/companion_libs/cloog.in
- ===================================================================
- --- config/companion_libs/cloog.in (revision 265)
- +++ config/companion_libs/cloog.in (working copy)
- @@ -9,6 +9,11 @@
- # Don't remove next line
- # CT_INSERT_VERSION_BELOW
- +config CLOOG_V_0_18_1
- + bool
- + prompt "0.18.1"
- + select CLOOG_0_18_or_later
- +
- config CLOOG_V_0_18_0
- bool
- prompt "0.18.0"
- @@ -52,6 +57,7 @@
- string
- # Don't remove next line
- # CT_INSERT_VERSION_STRING_BELOW
- + default "0.18.1" if CLOOG_V_0_18_1
- default "0.18.0" if CLOOG_V_0_18_0
- default "0.15.11" if CLOOG_V_0_15_11
- default "0.15.10" if CLOOG_V_0_15_10
- Index: config/companion_libs/gmp.in
- ===================================================================
- --- config/companion_libs/gmp.in (revision 265)
- +++ config/companion_libs/gmp.in (working copy)
- @@ -6,6 +6,14 @@
- # Don't remove next line
- # CT_INSERT_VERSION_BELOW
- +config GMP_V_5_1_3
- + bool
- + prompt "5.1.3"
- +
- +config GMP_V_5_1_2
- + bool
- + prompt "5.1.2"
- +
- config GMP_V_5_1_1
- bool
- prompt "5.1.1"
- @@ -36,6 +44,8 @@
- string
- # Don't remove next line
- # CT_INSERT_VERSION_STRING_BELOW
- + default "5.1.3" if GMP_V_5_1_3
- + default "5.1.2" if GMP_V_5_1_2
- default "5.1.1" if GMP_V_5_1_1
- default "5.0.2" if GMP_V_5_0_2
- default "5.0.1" if GMP_V_5_0_1
- Index: config/debug/gdb.in
- ===================================================================
- --- config/debug/gdb.in (revision 265)
- +++ config/debug/gdb.in (working copy)
- @@ -34,6 +34,12 @@
- # CT_INSERT_VERSION_BELOW
- +config GDB_V_7_6_2
- + bool
- + prompt "7.6.2"
- + select GDB_7_0_or_later
- + select GDB_7_2_or_later
- +
- config GDB_V_7_6_1
- bool
- prompt "7.6.1"
- @@ -157,6 +163,7 @@
- string
- # Don't remove next line
- # CT_INSERT_VERSION_STRING_BELOW
- + default "7.6.2" if GDB_V_7_6_2
- default "7.6.1" if GDB_V_7_6_1
- default "linaro-7.6-2013.05" if GDB_V_linaro_7_6_2013_05
- default "7.5.1" if GDB_V_7_5_1
- Index: config/libc/mingw.in
- ===================================================================
- --- config/libc/mingw.in (revision 265)
- +++ config/libc/mingw.in (working copy)
- @@ -14,6 +14,14 @@
- # Don't remove next line
- # CT_INSERT_VERSION_BELOW
- +config WINAPI_V_3_1_0
- + bool
- + prompt "3.1.0"
- +
- +config WINAPI_V_3_0_0
- + bool
- + prompt "3.0.0"
- +
- config WINAPI_V_2_0_8
- bool
- prompt "2.0.8"
- @@ -22,10 +30,6 @@
- bool
- prompt "2.0.7"
- -config WINAPI_V_3_0_0
- - bool
- - prompt "3.0.0"
- -
- config WINAPI_V_select
- bool
- prompt "Other version"
- @@ -37,6 +41,7 @@
- prompt "Windows API version" if WINAPI_V_select
- # Don't remove next line
- # CT_INSERT_VERSION_STRING_BELOW
- + default "3.1.0" if WINAPI_V_3_1_0
- default "3.0.0" if WINAPI_V_3_0_0
- default "2.0.8" if WINAPI_V_2_0_8
- default "2.0.7" if WINAPI_V_2_0_7
- Index: kconfig/nconf.c
- ===================================================================
- --- kconfig/nconf.c (revision 265)
- +++ kconfig/nconf.c (working copy)
- @@ -1544,7 +1544,8 @@
- }
- notimeout(stdscr, FALSE);
- - ESCDELAY = 1;
- + //ESCDELAY = 1;
- + set_escdelay(1);
- /* set btns menu */
- curses_menu = new_menu(curses_menu_items);
- Index: patches/gdb/7.6.2/100-gdb-mingw-ncurse-compat.patch
- ===================================================================
- --- patches/gdb/7.6.2/100-gdb-mingw-ncurse-compat.patch (revision 0)
- +++ patches/gdb/7.6.2/100-gdb-mingw-ncurse-compat.patch (working copy)
- @@ -0,0 +1,35 @@
- +--- a/gdb/windows-termcap.c.orig 2013-12-08 05:11:51.000000000 +0100
- ++++ b/gdb/windows-termcap.c 2014-01-18 21:55:31.443185000 +0100
- +@@ -20,13 +20,16 @@
- + along with this program. If not, see <http://www.gnu.org/licenses/>. */
- +
- + #include <stdlib.h>
- ++#include <config.h>
- +
- + /* -Wmissing-prototypes */
- + extern int tgetent (char *buffer, char *termtype);
- + extern int tgetnum (char *name);
- + extern int tgetflag (char *name);
- + extern char* tgetstr (char *name, char **area);
- ++#ifndef HAVE_NCURSES_NCURSES_H
- + extern int tputs (char *string, int nlines, int (*outfun) ());
- ++#endif
- + extern char *tgoto (const char *cap, int col, int row);
- +
- + /* Each of the files below is a minimal implementation of the standard
- +@@ -57,6 +60,7 @@
- + return NULL;
- + }
- +
- ++#ifndef HAVE_NCURSES_NCURSES_H
- + int
- + tputs (char *string, int nlines, int (*outfun) ())
- + {
- +@@ -65,6 +69,7 @@
- +
- + return 0;
- + }
- ++#endif
- +
- + char *
- + tgoto (const char *cap, int col, int row)
- Index: patches/gdb/7.6.2/100-gdb-mingw-ncurse-compat.patch
- ===================================================================
- --- patches/gdb/7.6.2/100-gdb-mingw-ncurse-compat.patch (revision 0)
- +++ patches/gdb/7.6.2/100-gdb-mingw-ncurse-compat.patch (working copy)
- @@ -0,0 +1,35 @@
- +--- a/gdb/windows-termcap.c.orig 2013-12-08 05:11:51.000000000 +0100
- ++++ b/gdb/windows-termcap.c 2014-01-18 21:55:31.443185000 +0100
- +@@ -20,13 +20,16 @@
- + along with this program. If not, see <http://www.gnu.org/licenses/>. */
- +
- + #include <stdlib.h>
- ++#include <config.h>
- +
- + /* -Wmissing-prototypes */
- + extern int tgetent (char *buffer, char *termtype);
- + extern int tgetnum (char *name);
- + extern int tgetflag (char *name);
- + extern char* tgetstr (char *name, char **area);
- ++#ifndef HAVE_NCURSES_NCURSES_H
- + extern int tputs (char *string, int nlines, int (*outfun) ());
- ++#endif
- + extern char *tgoto (const char *cap, int col, int row);
- +
- + /* Each of the files below is a minimal implementation of the standard
- +@@ -57,6 +60,7 @@
- + return NULL;
- + }
- +
- ++#ifndef HAVE_NCURSES_NCURSES_H
- + int
- + tputs (char *string, int nlines, int (*outfun) ())
- + {
- +@@ -65,6 +69,7 @@
- +
- + return 0;
- + }
- ++#endif
- +
- + char *
- + tgoto (const char *cap, int col, int row)
- Index: patches/gmp/5.1.3/100-use-srcdirrel-to-avoid-MSYS-path-namespace-mismatch.patch
- ===================================================================
- --- patches/gmp/5.1.3/100-use-srcdirrel-to-avoid-MSYS-path-namespace-mismatch.patch (revision 0)
- +++ patches/gmp/5.1.3/100-use-srcdirrel-to-avoid-MSYS-path-namespace-mismatch.patch (working copy)
- @@ -0,0 +1,742 @@
- +diff -urN a/acinclude.m4 b/acinclude.m4
- +--- a/acinclude.m4 2013-05-20 15:59:56.000000000 +0100
- ++++ b/acinclude.m4 2013-07-11 11:34:02.004378404 +0100
- +@@ -126,7 +126,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"]
- ++#include "$srcdirrel/gmp-h.in"]
- + ])
- +
- +
- +@@ -3386,7 +3386,7 @@
- + gmp_cv_func_alloca,
- + [AC_TRY_LINK(
- + GMP_INCLUDE_GMP_H
- +-[#include "$srcdir/gmp-impl.h"
- ++[#include "$srcdirrel/gmp-impl.h"
- + ],
- + [char *p = (char *) alloca (1);],
- + gmp_cv_func_alloca=yes,
- +diff -urN a/ax_compute_relative_paths.m4 b/ax_compute_relative_paths.m4
- +--- a/ax_compute_relative_paths.m4 1970-01-01 01:00:00.000000000 +0100
- ++++ b/ax_compute_relative_paths.m4 2013-07-11 11:34:02.007711740 +0100
- +@@ -0,0 +1,190 @@
- ++# =============================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_compute_relative_paths.html
- ++# =============================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS(PATH_LIST)
- ++#
- ++# DESCRIPTION
- ++#
- ++# PATH_LIST is a space-separated list of colon-separated triplets of the
- ++# form 'FROM:TO:RESULT'. This function iterates over these triplets and
- ++# set $RESULT to the relative path from $FROM to $TO. Note that $FROM and
- ++# $TO needs to be absolute filenames for this macro to success.
- ++#
- ++# For instance,
- ++#
- ++# first=/usr/local/bin
- ++# second=/usr/local/share
- ++# AX_COMPUTE_RELATIVE_PATHS([first:second:fs second:first:sf])
- ++# # $fs is set to ../share
- ++# # $sf is set to ../bin
- ++#
- ++# $FROM and $TO are both eval'ed recursively and normalized, this means
- ++# that you can call this macro with autoconf's dirnames like `prefix' or
- ++# `datadir'. For example:
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data])
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS should also works with DOS filenames.
- ++#
- ++# You may want to use this macro in order to make your package
- ++# relocatable. Instead of hardcoding $datadir into your programs just
- ++# encode $bin_to_data and try to determine $bindir at run-time.
- ++#
- ++# This macro requires AX_NORMALIZE_PATH.
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 6
- ++
- ++AU_ALIAS([ADL_COMPUTE_RELATIVE_PATHS], [AX_COMPUTE_RELATIVE_PATHS])
- ++AC_DEFUN([AX_COMPUTE_RELATIVE_PATHS],
- ++[for _lcl_i in $1; do
- ++ _lcl_from=\[$]`echo "[$]_lcl_i" | sed 's,:.*$,,'`
- ++ _lcl_to=\[$]`echo "[$]_lcl_i" | sed 's,^[[^:]]*:,,' | sed 's,:[[^:]]*$,,'`
- ++ _lcl_result_var=`echo "[$]_lcl_i" | sed 's,^.*:,,'`
- ++ AX_RECURSIVE_EVAL([[$]_lcl_from], [_lcl_from])
- ++ AX_RECURSIVE_EVAL([[$]_lcl_to], [_lcl_to])
- ++ _lcl_notation="$_lcl_from$_lcl_to"
- ++ AX_NORMALIZE_PATH([_lcl_from],['/'])
- ++ AX_NORMALIZE_PATH([_lcl_to],['/'])
- ++ AX_COMPUTE_RELATIVE_PATH([_lcl_from], [_lcl_to], [_lcl_result_tmp])
- ++ AX_NORMALIZE_PATH([_lcl_result_tmp],["[$]_lcl_notation"])
- ++ eval $_lcl_result_var='[$]_lcl_result_tmp'
- ++done])
- ++
- ++## Note:
- ++## *****
- ++## The following helper macros are too fragile to be used out
- ++## of AX_COMPUTE_RELATIVE_PATHS (mainly because they assume that
- ++## paths are normalized), that's why I'm keeping them in the same file.
- ++## Still, some of them maybe worth to reuse.
- ++
- ++dnl AX_COMPUTE_RELATIVE_PATH(FROM, TO, RESULT)
- ++dnl ===========================================
- ++dnl Compute the relative path to go from $FROM to $TO and set the value
- ++dnl of $RESULT to that value. This function work on raw filenames
- ++dnl (for instead it will considerate /usr//local and /usr/local as
- ++dnl two distinct paths), you should really use AX_COMPUTE_REALTIVE_PATHS
- ++dnl instead to have the paths sanitized automatically.
- ++dnl
- ++dnl For instance:
- ++dnl first_dir=/somewhere/on/my/disk/bin
- ++dnl second_dir=/somewhere/on/another/disk/share
- ++dnl AX_COMPUTE_RELATIVE_PATH(first_dir, second_dir, first_to_second)
- ++dnl will set $first_to_second to '../../../another/disk/share'.
- ++AC_DEFUN([AX_COMPUTE_RELATIVE_PATH],
- ++[AX_COMPUTE_COMMON_PATH([$1], [$2], [_lcl_common_prefix])
- ++AX_COMPUTE_BACK_PATH([$1], [_lcl_common_prefix], [_lcl_first_rel])
- ++AX_COMPUTE_SUFFIX_PATH([$2], [_lcl_common_prefix], [_lcl_second_suffix])
- ++$3="[$]_lcl_first_rel[$]_lcl_second_suffix"])
- ++
- ++dnl AX_COMPUTE_COMMON_PATH(LEFT, RIGHT, RESULT)
- ++dnl ============================================
- ++dnl Compute the common path to $LEFT and $RIGHT and set the result to $RESULT.
- ++dnl
- ++dnl For instance:
- ++dnl first_path=/somewhere/on/my/disk/bin
- ++dnl second_path=/somewhere/on/another/disk/share
- ++dnl AX_COMPUTE_COMMON_PATH(first_path, second_path, common_path)
- ++dnl will set $common_path to '/somewhere/on'.
- ++AC_DEFUN([AX_COMPUTE_COMMON_PATH],
- ++[$3=''
- ++_lcl_second_prefix_match=''
- ++while test "[$]_lcl_second_prefix_match" != 0; do
- ++ _lcl_first_prefix=`expr "x[$]$1" : "x\([$]$3/*[[^/]]*\)"`
- ++ _lcl_second_prefix_match=`expr "x[$]$2" : "x[$]_lcl_first_prefix"`
- ++ if test "[$]_lcl_second_prefix_match" != 0; then
- ++ if test "[$]_lcl_first_prefix" != "[$]$3"; then
- ++ $3="[$]_lcl_first_prefix"
- ++ else
- ++ _lcl_second_prefix_match=0
- ++ fi
- ++ fi
- ++done])
- ++
- ++dnl AX_COMPUTE_SUFFIX_PATH(PATH, SUBPATH, RESULT)
- ++dnl ==============================================
- ++dnl Substrack $SUBPATH from $PATH, and set the resulting suffix
- ++dnl (or the empty string if $SUBPATH is not a subpath of $PATH)
- ++dnl to $RESULT.
- ++dnl
- ++dnl For instace:
- ++dnl first_path=/somewhere/on/my/disk/bin
- ++dnl second_path=/somewhere/on
- ++dnl AX_COMPUTE_SUFFIX_PATH(first_path, second_path, common_path)
- ++dnl will set $common_path to '/my/disk/bin'.
- ++AC_DEFUN([AX_COMPUTE_SUFFIX_PATH],
- ++[$3=`expr "x[$]$1" : "x[$]$2/*\(.*\)"`])
- ++
- ++dnl AX_COMPUTE_BACK_PATH(PATH, SUBPATH, RESULT)
- ++dnl ============================================
- ++dnl Compute the relative path to go from $PATH to $SUBPATH, knowing that
- ++dnl $SUBPATH is a subpath of $PATH (any other words, only repeated '../'
- ++dnl should be needed to move from $PATH to $SUBPATH) and set the value
- ++dnl of $RESULT to that value. If $SUBPATH is not a subpath of PATH,
- ++dnl set $RESULT to the empty string.
- ++dnl
- ++dnl For instance:
- ++dnl first_path=/somewhere/on/my/disk/bin
- ++dnl second_path=/somewhere/on
- ++dnl AX_COMPUTE_BACK_PATH(first_path, second_path, back_path)
- ++dnl will set $back_path to '../../../'.
- ++AC_DEFUN([AX_COMPUTE_BACK_PATH],
- ++[AX_COMPUTE_SUFFIX_PATH([$1], [$2], [_lcl_first_suffix])
- ++$3=''
- ++_lcl_tmp='xxx'
- ++while test "[$]_lcl_tmp" != ''; do
- ++ _lcl_tmp=`expr "x[$]_lcl_first_suffix" : "x[[^/]]*/*\(.*\)"`
- ++ if test "[$]_lcl_first_suffix" != ''; then
- ++ _lcl_first_suffix="[$]_lcl_tmp"
- ++ $3="../[$]$3"
- ++ fi
- ++done])
- ++
- ++
- ++dnl AX_RECURSIVE_EVAL(VALUE, RESULT)
- ++dnl =================================
- ++dnl Interpolate the VALUE in loop until it doesn't change,
- ++dnl and set the result to $RESULT.
- ++dnl WARNING: It's easy to get an infinite loop with some unsane input.
- ++AC_DEFUN([AX_RECURSIVE_EVAL],
- ++[_lcl_receval="$1"
- ++$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- ++ _lcl_receval_old=''
- ++ while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
- ++ _lcl_receval_old="[$]_lcl_receval"
- ++ eval _lcl_receval="\"[$]_lcl_receval\""
- ++ done
- ++ echo "[$]_lcl_receval")`])
- +diff -urN a/ax_normalize_path.m4 b/ax_normalize_path.m4
- +--- a/ax_normalize_path.m4 1970-01-01 01:00:00.000000000 +0100
- ++++ b/ax_normalize_path.m4 2013-07-11 11:34:02.011045074 +0100
- +@@ -0,0 +1,115 @@
- ++# ===========================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
- ++# ===========================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
- ++#
- ++# DESCRIPTION
- ++#
- ++# Perform some cleanups on the value of $VARNAME (interpreted as a path):
- ++#
- ++# - empty paths are changed to '.'
- ++# - trailing slashes are removed
- ++# - repeated slashes are squeezed except a leading doubled slash '//'
- ++# (which might indicate a networked disk on some OS).
- ++#
- ++# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
- ++# REFERENCE_STRING contains some backslashes, all slashes and backslashes
- ++# are turned into backslashes, otherwise they are all turned into slashes.
- ++#
- ++# This makes processing of DOS filenames quite easier, because you can
- ++# turn a filename to the Unix notation, make your processing, and turn it
- ++# back to original notation.
- ++#
- ++# filename='A:\FOO\\BAR\'
- ++# old_filename="$filename"
- ++# # Switch to the unix notation
- ++# AX_NORMALIZE_PATH([filename], ["/"])
- ++# # now we have $filename = 'A:/FOO/BAR' and we can process it as if
- ++# # it was a Unix path. For instance let's say that you want
- ++# # to append '/subpath':
- ++# filename="$filename/subpath"
- ++# # finally switch back to the original notation
- ++# AX_NORMALIZE_PATH([filename], ["$old_filename"])
- ++# # now $filename equals to 'A:\FOO\BAR\subpath'
- ++#
- ++# One good reason to make all path processing with the unix convention is
- ++# that backslashes have a special meaning in many cases. For instance
- ++#
- ++# expr 'A:\FOO' : 'A:\Foo'
- ++#
- ++# will return 0 because the second argument is a regex in which
- ++# backslashes have to be backslashed. In other words, to have the two
- ++# strings to match you should write this instead:
- ++#
- ++# expr 'A:\Foo' : 'A:\\Foo'
- ++#
- ++# Such behavior makes DOS filenames extremely unpleasant to work with. So
- ++# temporary turn your paths to the Unix notation, and revert them to the
- ++# original notation after the processing. See the macro
- ++# AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
- ++#
- ++# REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
- ++# converted to backslashes if $VARIABLE already contains some backslashes
- ++# (see $thirddir below).
- ++#
- ++# firstdir='/usr/local//share'
- ++# seconddir='C:\Program Files\\'
- ++# thirddir='C:\home/usr/'
- ++# AX_NORMALIZE_PATH([firstdir])
- ++# AX_NORMALIZE_PATH([seconddir])
- ++# AX_NORMALIZE_PATH([thirddir])
- ++# # $firstdir = '/usr/local/share'
- ++# # $seconddir = 'C:\Program Files'
- ++# # $thirddir = 'C:\home\usr'
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 5
- ++
- ++AU_ALIAS([ADL_NORMALIZE_PATH], [AX_NORMALIZE_PATH])
- ++AC_DEFUN([AX_NORMALIZE_PATH],
- ++[case ":[$]$1:" in
- ++# change empty paths to '.'
- ++ ::) $1='.' ;;
- ++# strip trailing slashes
- ++ :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case ifelse($2,,"[$]$1",$2) in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,/,g'` ;;
- ++esac])
- +diff -urN a/configure b/configure
- +--- a/configure 2013-05-20 16:00:02.000000000 +0100
- ++++ b/configure 2013-07-11 11:34:06.397711837 +0100
- +@@ -2988,6 +2988,234 @@
- +
- +
- +
- ++# ===========================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
- ++# ===========================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
- ++#
- ++# DESCRIPTION
- ++#
- ++# Perform some cleanups on the value of $VARNAME (interpreted as a path):
- ++#
- ++# - empty paths are changed to '.'
- ++# - trailing slashes are removed
- ++# - repeated slashes are squeezed except a leading doubled slash '//'
- ++# (which might indicate a networked disk on some OS).
- ++#
- ++# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
- ++# REFERENCE_STRING contains some backslashes, all slashes and backslashes
- ++# are turned into backslashes, otherwise they are all turned into slashes.
- ++#
- ++# This makes processing of DOS filenames quite easier, because you can
- ++# turn a filename to the Unix notation, make your processing, and turn it
- ++# back to original notation.
- ++#
- ++# filename='A:\FOO\\BAR\'
- ++# old_filename="$filename"
- ++# # Switch to the unix notation
- ++# AX_NORMALIZE_PATH([filename], ["/"])
- ++# # now we have $filename = 'A:/FOO/BAR' and we can process it as if
- ++# # it was a Unix path. For instance let's say that you want
- ++# # to append '/subpath':
- ++# filename="$filename/subpath"
- ++# # finally switch back to the original notation
- ++# AX_NORMALIZE_PATH([filename], ["$old_filename"])
- ++# # now $filename equals to 'A:\FOO\BAR\subpath'
- ++#
- ++# One good reason to make all path processing with the unix convention is
- ++# that backslashes have a special meaning in many cases. For instance
- ++#
- ++# expr 'A:\FOO' : 'A:\Foo'
- ++#
- ++# will return 0 because the second argument is a regex in which
- ++# backslashes have to be backslashed. In other words, to have the two
- ++# strings to match you should write this instead:
- ++#
- ++# expr 'A:\Foo' : 'A:\\Foo'
- ++#
- ++# Such behavior makes DOS filenames extremely unpleasant to work with. So
- ++# temporary turn your paths to the Unix notation, and revert them to the
- ++# original notation after the processing. See the macro
- ++# AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
- ++#
- ++# REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
- ++# converted to backslashes if $VARIABLE already contains some backslashes
- ++# (see $thirddir below).
- ++#
- ++# firstdir='/usr/local//share'
- ++# seconddir='C:\Program Files\\'
- ++# thirddir='C:\home/usr/'
- ++# AX_NORMALIZE_PATH([firstdir])
- ++# AX_NORMALIZE_PATH([seconddir])
- ++# AX_NORMALIZE_PATH([thirddir])
- ++# # $firstdir = '/usr/local/share'
- ++# # $seconddir = 'C:\Program Files'
- ++# # $thirddir = 'C:\home\usr'
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 5
- ++
- ++# This is what autoupdate's m4 run will expand. It fires
- ++# the warning (with _au_warn_XXX), outputs it into the
- ++# updated configure.ac (with AC_DIAGNOSE), and then outputs
- ++# the replacement expansion.
- ++
- ++
- ++# This is an auxiliary macro that is also run when
- ++# autoupdate runs m4. It simply calls m4_warning, but
- ++# we need a wrapper so that each warning is emitted only
- ++# once. We break the quoting in m4_warning's argument in
- ++# order to expand this macro's arguments, not AU_DEFUN's.
- ++
- ++
- ++# Finally, this is the expansion that is picked up by
- ++# autoconf. It tells the user to run autoupdate, and
- ++# then outputs the replacement expansion. We do not care
- ++# about autoupdate's warning because that contains
- ++# information on what to do *after* running autoupdate.
- ++
- ++
- ++
- ++# =============================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_compute_relative_paths.html
- ++# =============================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS(PATH_LIST)
- ++#
- ++# DESCRIPTION
- ++#
- ++# PATH_LIST is a space-separated list of colon-separated triplets of the
- ++# form 'FROM:TO:RESULT'. This function iterates over these triplets and
- ++# set $RESULT to the relative path from $FROM to $TO. Note that $FROM and
- ++# $TO needs to be absolute filenames for this macro to success.
- ++#
- ++# For instance,
- ++#
- ++# first=/usr/local/bin
- ++# second=/usr/local/share
- ++# AX_COMPUTE_RELATIVE_PATHS([first:second:fs second:first:sf])
- ++# # $fs is set to ../share
- ++# # $sf is set to ../bin
- ++#
- ++# $FROM and $TO are both eval'ed recursively and normalized, this means
- ++# that you can call this macro with autoconf's dirnames like `prefix' or
- ++# `datadir'. For example:
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data])
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS should also works with DOS filenames.
- ++#
- ++# You may want to use this macro in order to make your package
- ++# relocatable. Instead of hardcoding $datadir into your programs just
- ++# encode $bin_to_data and try to determine $bindir at run-time.
- ++#
- ++# This macro requires AX_NORMALIZE_PATH.
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 6
- ++
- ++# This is what autoupdate's m4 run will expand. It fires
- ++# the warning (with _au_warn_XXX), outputs it into the
- ++# updated configure.ac (with AC_DIAGNOSE), and then outputs
- ++# the replacement expansion.
- ++
- ++
- ++# This is an auxiliary macro that is also run when
- ++# autoupdate runs m4. It simply calls m4_warning, but
- ++# we need a wrapper so that each warning is emitted only
- ++# once. We break the quoting in m4_warning's argument in
- ++# order to expand this macro's arguments, not AU_DEFUN's.
- ++
- ++
- ++# Finally, this is the expansion that is picked up by
- ++# autoconf. It tells the user to run autoupdate, and
- ++# then outputs the replacement expansion. We do not care
- ++# about autoupdate's warning because that contains
- ++# information on what to do *after* running autoupdate.
- ++
- ++
- ++
- ++## Note:
- ++## *****
- ++## The following helper macros are too fragile to be used out
- ++## of AX_COMPUTE_RELATIVE_PATHS (mainly because they assume that
- ++## paths are normalized), that's why I'm keeping them in the same file.
- ++## Still, some of them maybe worth to reuse.
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- +
- +
- +
- +@@ -3865,6 +4093,104 @@
- + echo "define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')" >> $gmp_tmpconfigm4p
- +
- +
- ++# Need to form the relative path from builddir to srcdir and use it in
- ++# the #include path in GMP_INCLUDE_GMP_H and GMP_FUNC_ALLOCA instead of
- ++# srcdir directly because srcdir could be an MSYS or Cygwin path and
- ++# GCC could be a native executable.
- ++builddir=$PWD
- ++for _lcl_i in builddir:srcdir:srcdirrel; do
- ++ _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'`
- ++ _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'`
- ++ _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'`
- ++ _lcl_receval="$_lcl_from"
- ++_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- ++ _lcl_receval_old=''
- ++ while test "$_lcl_receval_old" != "$_lcl_receval"; do
- ++ _lcl_receval_old="$_lcl_receval"
- ++ eval _lcl_receval="\"$_lcl_receval\""
- ++ done
- ++ echo "$_lcl_receval")`
- ++ _lcl_receval="$_lcl_to"
- ++_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- ++ _lcl_receval_old=''
- ++ while test "$_lcl_receval_old" != "$_lcl_receval"; do
- ++ _lcl_receval_old="$_lcl_receval"
- ++ eval _lcl_receval="\"$_lcl_receval\""
- ++ done
- ++ echo "$_lcl_receval")`
- ++ _lcl_notation="$_lcl_from$_lcl_to"
- ++ case ":$_lcl_from:" in
- ++# change empty paths to '.'
- ++ ::) _lcl_from='.' ;;
- ++# strip trailing slashes
- ++ :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case '/' in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,/,g'` ;;
- ++esac
- ++ case ":$_lcl_to:" in
- ++# change empty paths to '.'
- ++ ::) _lcl_to='.' ;;
- ++# strip trailing slashes
- ++ :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case '/' in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,/,g'` ;;
- ++esac
- ++ _lcl_common_prefix=''
- ++_lcl_second_prefix_match=''
- ++while test "$_lcl_second_prefix_match" != 0; do
- ++ _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"`
- ++ _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"`
- ++ if test "$_lcl_second_prefix_match" != 0; then
- ++ if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then
- ++ _lcl_common_prefix="$_lcl_first_prefix"
- ++ else
- ++ _lcl_second_prefix_match=0
- ++ fi
- ++ fi
- ++done
- ++_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"`
- ++_lcl_first_rel=''
- ++_lcl_tmp='xxx'
- ++while test "$_lcl_tmp" != ''; do
- ++ _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"`
- ++ if test "$_lcl_first_suffix" != ''; then
- ++ _lcl_first_suffix="$_lcl_tmp"
- ++ _lcl_first_rel="../$_lcl_first_rel"
- ++ fi
- ++done
- ++_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
- ++_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
- ++ case ":$_lcl_result_tmp:" in
- ++# change empty paths to '.'
- ++ ::) _lcl_result_tmp='.' ;;
- ++# strip trailing slashes
- ++ :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case "$_lcl_notation" in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,/,g'` ;;
- ++esac
- ++ eval $_lcl_result_var='$_lcl_result_tmp'
- ++done
- ++
- +
- +
- +
- +@@ -25488,7 +25814,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"
- ++#include "$srcdirrel/gmp-h.in"
- +
- + #ifndef __GMP_EXTERN_INLINE
- + die die die
- +@@ -25698,9 +26024,9 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"
- ++#include "$srcdirrel/gmp-h.in"
- +
- +-#include "$srcdir/gmp-impl.h"
- ++#include "$srcdirrel/gmp-impl.h"
- +
- + int
- + main ()
- +@@ -25795,7 +26121,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"
- ++#include "$srcdirrel/gmp-h.in"
- +
- + #if ! _GMP_H_HAVE_FILE
- + die die die
- +@@ -28901,7 +29227,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include \"$srcdir/gmp-h.in\"
- ++#include \"$srcdirrel/gmp-h.in\"
- +
- + "; then :
- +
- +diff -urN a/configure.ac b/configure.ac
- +--- a/configure.ac 2013-05-20 15:59:56.000000000 +0100
- ++++ b/configure.ac 2013-07-11 11:34:02.024378407 +0100
- +@@ -29,6 +29,8 @@
- + AC_PREREQ(2.59)
- + AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp)
- + AC_CONFIG_SRCDIR(gmp-impl.h)
- ++m4_include([ax_normalize_path.m4])
- ++m4_include([ax_compute_relative_paths.m4])
- + m4_pattern_forbid([^[ \t]*GMP_])
- + m4_pattern_allow(GMP_LDFLAGS)
- + m4_pattern_allow(GMP_LIMB_BITS)
- +@@ -257,6 +259,13 @@
- + AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_$tmp_host)
- + GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')", POST)
- +
- ++# Need to form the relative path from builddir to srcdir and use it in
- ++# the #include path in GMP_INCLUDE_GMP_H and GMP_FUNC_ALLOCA instead of
- ++# srcdir directly because srcdir could be an MSYS or Cygwin path and
- ++# GCC could be a native executable.
- ++builddir=$PWD
- ++AX_COMPUTE_RELATIVE_PATHS([builddir:srcdir:srcdirrel])
- ++
- + dnl The HAVE_HOST_CPU_ list here only needs to have entries for those which
- + dnl are going to be tested, not everything that can possibly be selected.
- + dnl
- Index: patches/gmp/5.1.3/100-use-srcdirrel-to-avoid-MSYS-path-namespace-mismatch.patch
- ===================================================================
- --- patches/gmp/5.1.3/100-use-srcdirrel-to-avoid-MSYS-path-namespace-mismatch.patch (revision 0)
- +++ patches/gmp/5.1.3/100-use-srcdirrel-to-avoid-MSYS-path-namespace-mismatch.patch (working copy)
- @@ -0,0 +1,742 @@
- +diff -urN a/acinclude.m4 b/acinclude.m4
- +--- a/acinclude.m4 2013-05-20 15:59:56.000000000 +0100
- ++++ b/acinclude.m4 2013-07-11 11:34:02.004378404 +0100
- +@@ -126,7 +126,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"]
- ++#include "$srcdirrel/gmp-h.in"]
- + ])
- +
- +
- +@@ -3386,7 +3386,7 @@
- + gmp_cv_func_alloca,
- + [AC_TRY_LINK(
- + GMP_INCLUDE_GMP_H
- +-[#include "$srcdir/gmp-impl.h"
- ++[#include "$srcdirrel/gmp-impl.h"
- + ],
- + [char *p = (char *) alloca (1);],
- + gmp_cv_func_alloca=yes,
- +diff -urN a/ax_compute_relative_paths.m4 b/ax_compute_relative_paths.m4
- +--- a/ax_compute_relative_paths.m4 1970-01-01 01:00:00.000000000 +0100
- ++++ b/ax_compute_relative_paths.m4 2013-07-11 11:34:02.007711740 +0100
- +@@ -0,0 +1,190 @@
- ++# =============================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_compute_relative_paths.html
- ++# =============================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS(PATH_LIST)
- ++#
- ++# DESCRIPTION
- ++#
- ++# PATH_LIST is a space-separated list of colon-separated triplets of the
- ++# form 'FROM:TO:RESULT'. This function iterates over these triplets and
- ++# set $RESULT to the relative path from $FROM to $TO. Note that $FROM and
- ++# $TO needs to be absolute filenames for this macro to success.
- ++#
- ++# For instance,
- ++#
- ++# first=/usr/local/bin
- ++# second=/usr/local/share
- ++# AX_COMPUTE_RELATIVE_PATHS([first:second:fs second:first:sf])
- ++# # $fs is set to ../share
- ++# # $sf is set to ../bin
- ++#
- ++# $FROM and $TO are both eval'ed recursively and normalized, this means
- ++# that you can call this macro with autoconf's dirnames like `prefix' or
- ++# `datadir'. For example:
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data])
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS should also works with DOS filenames.
- ++#
- ++# You may want to use this macro in order to make your package
- ++# relocatable. Instead of hardcoding $datadir into your programs just
- ++# encode $bin_to_data and try to determine $bindir at run-time.
- ++#
- ++# This macro requires AX_NORMALIZE_PATH.
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 6
- ++
- ++AU_ALIAS([ADL_COMPUTE_RELATIVE_PATHS], [AX_COMPUTE_RELATIVE_PATHS])
- ++AC_DEFUN([AX_COMPUTE_RELATIVE_PATHS],
- ++[for _lcl_i in $1; do
- ++ _lcl_from=\[$]`echo "[$]_lcl_i" | sed 's,:.*$,,'`
- ++ _lcl_to=\[$]`echo "[$]_lcl_i" | sed 's,^[[^:]]*:,,' | sed 's,:[[^:]]*$,,'`
- ++ _lcl_result_var=`echo "[$]_lcl_i" | sed 's,^.*:,,'`
- ++ AX_RECURSIVE_EVAL([[$]_lcl_from], [_lcl_from])
- ++ AX_RECURSIVE_EVAL([[$]_lcl_to], [_lcl_to])
- ++ _lcl_notation="$_lcl_from$_lcl_to"
- ++ AX_NORMALIZE_PATH([_lcl_from],['/'])
- ++ AX_NORMALIZE_PATH([_lcl_to],['/'])
- ++ AX_COMPUTE_RELATIVE_PATH([_lcl_from], [_lcl_to], [_lcl_result_tmp])
- ++ AX_NORMALIZE_PATH([_lcl_result_tmp],["[$]_lcl_notation"])
- ++ eval $_lcl_result_var='[$]_lcl_result_tmp'
- ++done])
- ++
- ++## Note:
- ++## *****
- ++## The following helper macros are too fragile to be used out
- ++## of AX_COMPUTE_RELATIVE_PATHS (mainly because they assume that
- ++## paths are normalized), that's why I'm keeping them in the same file.
- ++## Still, some of them maybe worth to reuse.
- ++
- ++dnl AX_COMPUTE_RELATIVE_PATH(FROM, TO, RESULT)
- ++dnl ===========================================
- ++dnl Compute the relative path to go from $FROM to $TO and set the value
- ++dnl of $RESULT to that value. This function work on raw filenames
- ++dnl (for instead it will considerate /usr//local and /usr/local as
- ++dnl two distinct paths), you should really use AX_COMPUTE_REALTIVE_PATHS
- ++dnl instead to have the paths sanitized automatically.
- ++dnl
- ++dnl For instance:
- ++dnl first_dir=/somewhere/on/my/disk/bin
- ++dnl second_dir=/somewhere/on/another/disk/share
- ++dnl AX_COMPUTE_RELATIVE_PATH(first_dir, second_dir, first_to_second)
- ++dnl will set $first_to_second to '../../../another/disk/share'.
- ++AC_DEFUN([AX_COMPUTE_RELATIVE_PATH],
- ++[AX_COMPUTE_COMMON_PATH([$1], [$2], [_lcl_common_prefix])
- ++AX_COMPUTE_BACK_PATH([$1], [_lcl_common_prefix], [_lcl_first_rel])
- ++AX_COMPUTE_SUFFIX_PATH([$2], [_lcl_common_prefix], [_lcl_second_suffix])
- ++$3="[$]_lcl_first_rel[$]_lcl_second_suffix"])
- ++
- ++dnl AX_COMPUTE_COMMON_PATH(LEFT, RIGHT, RESULT)
- ++dnl ============================================
- ++dnl Compute the common path to $LEFT and $RIGHT and set the result to $RESULT.
- ++dnl
- ++dnl For instance:
- ++dnl first_path=/somewhere/on/my/disk/bin
- ++dnl second_path=/somewhere/on/another/disk/share
- ++dnl AX_COMPUTE_COMMON_PATH(first_path, second_path, common_path)
- ++dnl will set $common_path to '/somewhere/on'.
- ++AC_DEFUN([AX_COMPUTE_COMMON_PATH],
- ++[$3=''
- ++_lcl_second_prefix_match=''
- ++while test "[$]_lcl_second_prefix_match" != 0; do
- ++ _lcl_first_prefix=`expr "x[$]$1" : "x\([$]$3/*[[^/]]*\)"`
- ++ _lcl_second_prefix_match=`expr "x[$]$2" : "x[$]_lcl_first_prefix"`
- ++ if test "[$]_lcl_second_prefix_match" != 0; then
- ++ if test "[$]_lcl_first_prefix" != "[$]$3"; then
- ++ $3="[$]_lcl_first_prefix"
- ++ else
- ++ _lcl_second_prefix_match=0
- ++ fi
- ++ fi
- ++done])
- ++
- ++dnl AX_COMPUTE_SUFFIX_PATH(PATH, SUBPATH, RESULT)
- ++dnl ==============================================
- ++dnl Substrack $SUBPATH from $PATH, and set the resulting suffix
- ++dnl (or the empty string if $SUBPATH is not a subpath of $PATH)
- ++dnl to $RESULT.
- ++dnl
- ++dnl For instace:
- ++dnl first_path=/somewhere/on/my/disk/bin
- ++dnl second_path=/somewhere/on
- ++dnl AX_COMPUTE_SUFFIX_PATH(first_path, second_path, common_path)
- ++dnl will set $common_path to '/my/disk/bin'.
- ++AC_DEFUN([AX_COMPUTE_SUFFIX_PATH],
- ++[$3=`expr "x[$]$1" : "x[$]$2/*\(.*\)"`])
- ++
- ++dnl AX_COMPUTE_BACK_PATH(PATH, SUBPATH, RESULT)
- ++dnl ============================================
- ++dnl Compute the relative path to go from $PATH to $SUBPATH, knowing that
- ++dnl $SUBPATH is a subpath of $PATH (any other words, only repeated '../'
- ++dnl should be needed to move from $PATH to $SUBPATH) and set the value
- ++dnl of $RESULT to that value. If $SUBPATH is not a subpath of PATH,
- ++dnl set $RESULT to the empty string.
- ++dnl
- ++dnl For instance:
- ++dnl first_path=/somewhere/on/my/disk/bin
- ++dnl second_path=/somewhere/on
- ++dnl AX_COMPUTE_BACK_PATH(first_path, second_path, back_path)
- ++dnl will set $back_path to '../../../'.
- ++AC_DEFUN([AX_COMPUTE_BACK_PATH],
- ++[AX_COMPUTE_SUFFIX_PATH([$1], [$2], [_lcl_first_suffix])
- ++$3=''
- ++_lcl_tmp='xxx'
- ++while test "[$]_lcl_tmp" != ''; do
- ++ _lcl_tmp=`expr "x[$]_lcl_first_suffix" : "x[[^/]]*/*\(.*\)"`
- ++ if test "[$]_lcl_first_suffix" != ''; then
- ++ _lcl_first_suffix="[$]_lcl_tmp"
- ++ $3="../[$]$3"
- ++ fi
- ++done])
- ++
- ++
- ++dnl AX_RECURSIVE_EVAL(VALUE, RESULT)
- ++dnl =================================
- ++dnl Interpolate the VALUE in loop until it doesn't change,
- ++dnl and set the result to $RESULT.
- ++dnl WARNING: It's easy to get an infinite loop with some unsane input.
- ++AC_DEFUN([AX_RECURSIVE_EVAL],
- ++[_lcl_receval="$1"
- ++$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- ++ _lcl_receval_old=''
- ++ while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
- ++ _lcl_receval_old="[$]_lcl_receval"
- ++ eval _lcl_receval="\"[$]_lcl_receval\""
- ++ done
- ++ echo "[$]_lcl_receval")`])
- +diff -urN a/ax_normalize_path.m4 b/ax_normalize_path.m4
- +--- a/ax_normalize_path.m4 1970-01-01 01:00:00.000000000 +0100
- ++++ b/ax_normalize_path.m4 2013-07-11 11:34:02.011045074 +0100
- +@@ -0,0 +1,115 @@
- ++# ===========================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
- ++# ===========================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
- ++#
- ++# DESCRIPTION
- ++#
- ++# Perform some cleanups on the value of $VARNAME (interpreted as a path):
- ++#
- ++# - empty paths are changed to '.'
- ++# - trailing slashes are removed
- ++# - repeated slashes are squeezed except a leading doubled slash '//'
- ++# (which might indicate a networked disk on some OS).
- ++#
- ++# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
- ++# REFERENCE_STRING contains some backslashes, all slashes and backslashes
- ++# are turned into backslashes, otherwise they are all turned into slashes.
- ++#
- ++# This makes processing of DOS filenames quite easier, because you can
- ++# turn a filename to the Unix notation, make your processing, and turn it
- ++# back to original notation.
- ++#
- ++# filename='A:\FOO\\BAR\'
- ++# old_filename="$filename"
- ++# # Switch to the unix notation
- ++# AX_NORMALIZE_PATH([filename], ["/"])
- ++# # now we have $filename = 'A:/FOO/BAR' and we can process it as if
- ++# # it was a Unix path. For instance let's say that you want
- ++# # to append '/subpath':
- ++# filename="$filename/subpath"
- ++# # finally switch back to the original notation
- ++# AX_NORMALIZE_PATH([filename], ["$old_filename"])
- ++# # now $filename equals to 'A:\FOO\BAR\subpath'
- ++#
- ++# One good reason to make all path processing with the unix convention is
- ++# that backslashes have a special meaning in many cases. For instance
- ++#
- ++# expr 'A:\FOO' : 'A:\Foo'
- ++#
- ++# will return 0 because the second argument is a regex in which
- ++# backslashes have to be backslashed. In other words, to have the two
- ++# strings to match you should write this instead:
- ++#
- ++# expr 'A:\Foo' : 'A:\\Foo'
- ++#
- ++# Such behavior makes DOS filenames extremely unpleasant to work with. So
- ++# temporary turn your paths to the Unix notation, and revert them to the
- ++# original notation after the processing. See the macro
- ++# AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
- ++#
- ++# REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
- ++# converted to backslashes if $VARIABLE already contains some backslashes
- ++# (see $thirddir below).
- ++#
- ++# firstdir='/usr/local//share'
- ++# seconddir='C:\Program Files\\'
- ++# thirddir='C:\home/usr/'
- ++# AX_NORMALIZE_PATH([firstdir])
- ++# AX_NORMALIZE_PATH([seconddir])
- ++# AX_NORMALIZE_PATH([thirddir])
- ++# # $firstdir = '/usr/local/share'
- ++# # $seconddir = 'C:\Program Files'
- ++# # $thirddir = 'C:\home\usr'
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 5
- ++
- ++AU_ALIAS([ADL_NORMALIZE_PATH], [AX_NORMALIZE_PATH])
- ++AC_DEFUN([AX_NORMALIZE_PATH],
- ++[case ":[$]$1:" in
- ++# change empty paths to '.'
- ++ ::) $1='.' ;;
- ++# strip trailing slashes
- ++ :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case ifelse($2,,"[$]$1",$2) in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,/,g'` ;;
- ++esac])
- +diff -urN a/configure b/configure
- +--- a/configure 2013-05-20 16:00:02.000000000 +0100
- ++++ b/configure 2013-07-11 11:34:06.397711837 +0100
- +@@ -2988,6 +2988,234 @@
- +
- +
- +
- ++# ===========================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
- ++# ===========================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
- ++#
- ++# DESCRIPTION
- ++#
- ++# Perform some cleanups on the value of $VARNAME (interpreted as a path):
- ++#
- ++# - empty paths are changed to '.'
- ++# - trailing slashes are removed
- ++# - repeated slashes are squeezed except a leading doubled slash '//'
- ++# (which might indicate a networked disk on some OS).
- ++#
- ++# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
- ++# REFERENCE_STRING contains some backslashes, all slashes and backslashes
- ++# are turned into backslashes, otherwise they are all turned into slashes.
- ++#
- ++# This makes processing of DOS filenames quite easier, because you can
- ++# turn a filename to the Unix notation, make your processing, and turn it
- ++# back to original notation.
- ++#
- ++# filename='A:\FOO\\BAR\'
- ++# old_filename="$filename"
- ++# # Switch to the unix notation
- ++# AX_NORMALIZE_PATH([filename], ["/"])
- ++# # now we have $filename = 'A:/FOO/BAR' and we can process it as if
- ++# # it was a Unix path. For instance let's say that you want
- ++# # to append '/subpath':
- ++# filename="$filename/subpath"
- ++# # finally switch back to the original notation
- ++# AX_NORMALIZE_PATH([filename], ["$old_filename"])
- ++# # now $filename equals to 'A:\FOO\BAR\subpath'
- ++#
- ++# One good reason to make all path processing with the unix convention is
- ++# that backslashes have a special meaning in many cases. For instance
- ++#
- ++# expr 'A:\FOO' : 'A:\Foo'
- ++#
- ++# will return 0 because the second argument is a regex in which
- ++# backslashes have to be backslashed. In other words, to have the two
- ++# strings to match you should write this instead:
- ++#
- ++# expr 'A:\Foo' : 'A:\\Foo'
- ++#
- ++# Such behavior makes DOS filenames extremely unpleasant to work with. So
- ++# temporary turn your paths to the Unix notation, and revert them to the
- ++# original notation after the processing. See the macro
- ++# AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
- ++#
- ++# REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
- ++# converted to backslashes if $VARIABLE already contains some backslashes
- ++# (see $thirddir below).
- ++#
- ++# firstdir='/usr/local//share'
- ++# seconddir='C:\Program Files\\'
- ++# thirddir='C:\home/usr/'
- ++# AX_NORMALIZE_PATH([firstdir])
- ++# AX_NORMALIZE_PATH([seconddir])
- ++# AX_NORMALIZE_PATH([thirddir])
- ++# # $firstdir = '/usr/local/share'
- ++# # $seconddir = 'C:\Program Files'
- ++# # $thirddir = 'C:\home\usr'
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 5
- ++
- ++# This is what autoupdate's m4 run will expand. It fires
- ++# the warning (with _au_warn_XXX), outputs it into the
- ++# updated configure.ac (with AC_DIAGNOSE), and then outputs
- ++# the replacement expansion.
- ++
- ++
- ++# This is an auxiliary macro that is also run when
- ++# autoupdate runs m4. It simply calls m4_warning, but
- ++# we need a wrapper so that each warning is emitted only
- ++# once. We break the quoting in m4_warning's argument in
- ++# order to expand this macro's arguments, not AU_DEFUN's.
- ++
- ++
- ++# Finally, this is the expansion that is picked up by
- ++# autoconf. It tells the user to run autoupdate, and
- ++# then outputs the replacement expansion. We do not care
- ++# about autoupdate's warning because that contains
- ++# information on what to do *after* running autoupdate.
- ++
- ++
- ++
- ++# =============================================================================
- ++# http://www.gnu.org/software/autoconf-archive/ax_compute_relative_paths.html
- ++# =============================================================================
- ++#
- ++# SYNOPSIS
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS(PATH_LIST)
- ++#
- ++# DESCRIPTION
- ++#
- ++# PATH_LIST is a space-separated list of colon-separated triplets of the
- ++# form 'FROM:TO:RESULT'. This function iterates over these triplets and
- ++# set $RESULT to the relative path from $FROM to $TO. Note that $FROM and
- ++# $TO needs to be absolute filenames for this macro to success.
- ++#
- ++# For instance,
- ++#
- ++# first=/usr/local/bin
- ++# second=/usr/local/share
- ++# AX_COMPUTE_RELATIVE_PATHS([first:second:fs second:first:sf])
- ++# # $fs is set to ../share
- ++# # $sf is set to ../bin
- ++#
- ++# $FROM and $TO are both eval'ed recursively and normalized, this means
- ++# that you can call this macro with autoconf's dirnames like `prefix' or
- ++# `datadir'. For example:
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data])
- ++#
- ++# AX_COMPUTE_RELATIVE_PATHS should also works with DOS filenames.
- ++#
- ++# You may want to use this macro in order to make your package
- ++# relocatable. Instead of hardcoding $datadir into your programs just
- ++# encode $bin_to_data and try to determine $bindir at run-time.
- ++#
- ++# This macro requires AX_NORMALIZE_PATH.
- ++#
- ++# LICENSE
- ++#
- ++# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
- ++#
- ++# This program is free software; you can redistribute it and/or modify it
- ++# under the terms of the GNU General Public License as published by the
- ++# Free Software Foundation; either version 2 of the License, or (at your
- ++# option) any later version.
- ++#
- ++# This program is distributed in the hope that it will be useful, but
- ++# WITHOUT ANY WARRANTY; without even the implied warranty of
- ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- ++# Public License for more details.
- ++#
- ++# You should have received a copy of the GNU General Public License along
- ++# with this program. If not, see <http://www.gnu.org/licenses/>.
- ++#
- ++# As a special exception, the respective Autoconf Macro's copyright owner
- ++# gives unlimited permission to copy, distribute and modify the configure
- ++# scripts that are the output of Autoconf when processing the Macro. You
- ++# need not follow the terms of the GNU General Public License when using
- ++# or distributing such scripts, even though portions of the text of the
- ++# Macro appear in them. The GNU General Public License (GPL) does govern
- ++# all other use of the material that constitutes the Autoconf Macro.
- ++#
- ++# This special exception to the GPL applies to versions of the Autoconf
- ++# Macro released by the Autoconf Archive. When you make and distribute a
- ++# modified version of the Autoconf Macro, you may extend this special
- ++# exception to the GPL to apply to your modified version as well.
- ++
- ++#serial 6
- ++
- ++# This is what autoupdate's m4 run will expand. It fires
- ++# the warning (with _au_warn_XXX), outputs it into the
- ++# updated configure.ac (with AC_DIAGNOSE), and then outputs
- ++# the replacement expansion.
- ++
- ++
- ++# This is an auxiliary macro that is also run when
- ++# autoupdate runs m4. It simply calls m4_warning, but
- ++# we need a wrapper so that each warning is emitted only
- ++# once. We break the quoting in m4_warning's argument in
- ++# order to expand this macro's arguments, not AU_DEFUN's.
- ++
- ++
- ++# Finally, this is the expansion that is picked up by
- ++# autoconf. It tells the user to run autoupdate, and
- ++# then outputs the replacement expansion. We do not care
- ++# about autoupdate's warning because that contains
- ++# information on what to do *after* running autoupdate.
- ++
- ++
- ++
- ++## Note:
- ++## *****
- ++## The following helper macros are too fragile to be used out
- ++## of AX_COMPUTE_RELATIVE_PATHS (mainly because they assume that
- ++## paths are normalized), that's why I'm keeping them in the same file.
- ++## Still, some of them maybe worth to reuse.
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- ++
- +
- +
- +
- +@@ -3865,6 +4093,104 @@
- + echo "define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')" >> $gmp_tmpconfigm4p
- +
- +
- ++# Need to form the relative path from builddir to srcdir and use it in
- ++# the #include path in GMP_INCLUDE_GMP_H and GMP_FUNC_ALLOCA instead of
- ++# srcdir directly because srcdir could be an MSYS or Cygwin path and
- ++# GCC could be a native executable.
- ++builddir=$PWD
- ++for _lcl_i in builddir:srcdir:srcdirrel; do
- ++ _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'`
- ++ _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'`
- ++ _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'`
- ++ _lcl_receval="$_lcl_from"
- ++_lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- ++ _lcl_receval_old=''
- ++ while test "$_lcl_receval_old" != "$_lcl_receval"; do
- ++ _lcl_receval_old="$_lcl_receval"
- ++ eval _lcl_receval="\"$_lcl_receval\""
- ++ done
- ++ echo "$_lcl_receval")`
- ++ _lcl_receval="$_lcl_to"
- ++_lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
- ++ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
- ++ _lcl_receval_old=''
- ++ while test "$_lcl_receval_old" != "$_lcl_receval"; do
- ++ _lcl_receval_old="$_lcl_receval"
- ++ eval _lcl_receval="\"$_lcl_receval\""
- ++ done
- ++ echo "$_lcl_receval")`
- ++ _lcl_notation="$_lcl_from$_lcl_to"
- ++ case ":$_lcl_from:" in
- ++# change empty paths to '.'
- ++ ::) _lcl_from='.' ;;
- ++# strip trailing slashes
- ++ :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case '/' in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,/,g'` ;;
- ++esac
- ++ case ":$_lcl_to:" in
- ++# change empty paths to '.'
- ++ ::) _lcl_to='.' ;;
- ++# strip trailing slashes
- ++ :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case '/' in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,/,g'` ;;
- ++esac
- ++ _lcl_common_prefix=''
- ++_lcl_second_prefix_match=''
- ++while test "$_lcl_second_prefix_match" != 0; do
- ++ _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"`
- ++ _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"`
- ++ if test "$_lcl_second_prefix_match" != 0; then
- ++ if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then
- ++ _lcl_common_prefix="$_lcl_first_prefix"
- ++ else
- ++ _lcl_second_prefix_match=0
- ++ fi
- ++ fi
- ++done
- ++_lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"`
- ++_lcl_first_rel=''
- ++_lcl_tmp='xxx'
- ++while test "$_lcl_tmp" != ''; do
- ++ _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"`
- ++ if test "$_lcl_first_suffix" != ''; then
- ++ _lcl_first_suffix="$_lcl_tmp"
- ++ _lcl_first_rel="../$_lcl_first_rel"
- ++ fi
- ++done
- ++_lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"`
- ++_lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix"
- ++ case ":$_lcl_result_tmp:" in
- ++# change empty paths to '.'
- ++ ::) _lcl_result_tmp='.' ;;
- ++# strip trailing slashes
- ++ :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;;
- ++ :*:) ;;
- ++esac
- ++# squeze repeated slashes
- ++case "$_lcl_notation" in
- ++# if the path contains any backslashes, turn slashes into backslashes
- ++ *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\\\\,g'` ;;
- ++# if the path contains slashes, also turn backslashes into slashes
- ++ *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,/,g'` ;;
- ++esac
- ++ eval $_lcl_result_var='$_lcl_result_tmp'
- ++done
- ++
- +
- +
- +
- +@@ -25488,7 +25814,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"
- ++#include "$srcdirrel/gmp-h.in"
- +
- + #ifndef __GMP_EXTERN_INLINE
- + die die die
- +@@ -25698,9 +26024,9 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"
- ++#include "$srcdirrel/gmp-h.in"
- +
- +-#include "$srcdir/gmp-impl.h"
- ++#include "$srcdirrel/gmp-impl.h"
- +
- + int
- + main ()
- +@@ -25795,7 +26121,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include "$srcdir/gmp-h.in"
- ++#include "$srcdirrel/gmp-h.in"
- +
- + #if ! _GMP_H_HAVE_FILE
- + die die die
- +@@ -28901,7 +29227,7 @@
- + #define GMP_NAIL_BITS $GMP_NAIL_BITS
- + #define GMP_LIMB_BITS 123
- + $DEFN_LONG_LONG_LIMB
- +-#include \"$srcdir/gmp-h.in\"
- ++#include \"$srcdirrel/gmp-h.in\"
- +
- + "; then :
- +
- +diff -urN a/configure.ac b/configure.ac
- +--- a/configure.ac 2013-05-20 15:59:56.000000000 +0100
- ++++ b/configure.ac 2013-07-11 11:34:02.024378407 +0100
- +@@ -29,6 +29,8 @@
- + AC_PREREQ(2.59)
- + AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp)
- + AC_CONFIG_SRCDIR(gmp-impl.h)
- ++m4_include([ax_normalize_path.m4])
- ++m4_include([ax_compute_relative_paths.m4])
- + m4_pattern_forbid([^[ \t]*GMP_])
- + m4_pattern_allow(GMP_LDFLAGS)
- + m4_pattern_allow(GMP_LIMB_BITS)
- +@@ -257,6 +259,13 @@
- + AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_$tmp_host)
- + GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')", POST)
- +
- ++# Need to form the relative path from builddir to srcdir and use it in
- ++# the #include path in GMP_INCLUDE_GMP_H and GMP_FUNC_ALLOCA instead of
- ++# srcdir directly because srcdir could be an MSYS or Cygwin path and
- ++# GCC could be a native executable.
- ++builddir=$PWD
- ++AX_COMPUTE_RELATIVE_PATHS([builddir:srcdir:srcdirrel])
- ++
- + dnl The HAVE_HOST_CPU_ list here only needs to have entries for those which
- + dnl are going to be tested, not everything that can possibly be selected.
- + dnl
- Index: scripts/build/binutils/binutils.sh
- ===================================================================
- --- scripts/build/binutils/binutils.sh (revision 265)
- +++ scripts/build/binutils/binutils.sh (working copy)
- @@ -343,6 +343,9 @@
- [ "${CT_TOOLCHAIN_ENABLE_NLS}" != "y" ] && extra_config+=("--disable-nls")
- CT_DoExecLog CFG \
- + CFLAGS="${CT_CFLAGS_FOR_BUILD}" \
- + CXXFLAGS="${CT_CFLAGS_FOR_BUILD}" \
- + LDFLAGS="${CT_LDFLAGS_FOR_BUILD}" \
- "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \
- --build=${CT_BUILD} \
- --host=${CT_TARGET} \
- Index: scripts/build/debug/300-gdb.sh
- ===================================================================
- --- scripts/build/debug/300-gdb.sh (revision 265)
- +++ scripts/build/debug/300-gdb.sh (working copy)
- @@ -123,14 +123,14 @@
- cd "${CT_BUILD_DIR}/build-gdb-cross"
- cross_extra_config=("${extra_config[@]}")
- - cross_extra_config+=("--enable-expat")
- cross_extra_config+=("--with-expat=yes")
- + cross_extra_config+=("--with-libexpat-prefix=/mingw${CT_ARCH_BITNESS}")
- case "${CT_THREADS}" in
- none) cross_extra_config+=("--disable-threads");;
- *) cross_extra_config+=("--enable-threads");;
- esac
- if [ "${CT_GDB_CROSS_PYTHON}" = "y" ]; then
- - cross_extra_config+=( "--with-python=yes" )
- + cross_extra_config+=( "--with-python=/mingw${CT_ARCH_BITNESS}" )
- else
- cross_extra_config+=( "--with-python=no" )
- fi
- @@ -155,6 +155,9 @@
- CT_DoExecLog CFG \
- CC="${CC_for_gdb}" \
- LD="${LD_for_gdb}" \
- + CFLAGS="${CT_CFLAGS_FOR_BUILD}" \
- + CXXFLAGS="${CT_CFLAGS_FOR_BUILD}" \
- + LDFLAGS="${CT_LDFLAGS_FOR_BUILD}" \
- "${gdb_src_dir}/configure" \
- --build=${CT_BUILD} \
- --host=${CT_HOST} \
- @@ -326,7 +329,9 @@
- CC="${CT_TARGET}-gcc" \
- CPP="${CT_TARGET}-cpp" \
- LD="${CT_TARGET}-ld" \
- - LDFLAGS="${gdbserver_LDFLAGS}" \
- + CFLAGS="${CT_CFLAGS_FOR_BUILD}" \
- + CXXFLAGS="${CT_CFLAGS_FOR_BUILD}" \
- + LDFLAGS="${CT_LDFLAGS_FOR_BUILD} ${gdbserver_LDFLAGS}" \
- "${gdb_src_dir}/gdb/gdbserver/configure" \
- --build=${CT_BUILD} \
- --host=${CT_TARGET} \
- Index: scripts/crosstool-NG.sh.in
- ===================================================================
- --- scripts/crosstool-NG.sh.in (revision 265)
- +++ scripts/crosstool-NG.sh.in (working copy)
- @@ -507,7 +507,7 @@
- # Help build gcc
- # Explicitly optimise, else the lines below will overide the
- # package's default optimisation flags
- - OPTIM_FLAGS="-O2 -g"
- + OPTIM_FLAGS="-O2"
- if [ "${CT_DEBUGGABLE_TOOLCHAIN}" = "y" ]; then
- # GCC 4.8 provides -Og, but we want as much
- # debugging as possible.
- Index: scripts/functions
- ===================================================================
- --- scripts/functions (revision 265)
- +++ scripts/functions (working copy)
- @@ -466,7 +466,7 @@
- for dir in "${@}"; do
- [ -d "${dir}" ] || continue
- case "$CT_SYS_OS" in
- - Linux|CYGWIN|MSYS*)
- + Linux|CYGWIN*|MSYS*)
- mode="$(stat -c '%a' "$(dirname "${dir}")")"
- ;;
- Darwin|*BSD)
Add Comment
Please, Sign In to add comment