summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorYu Jiung <jiung.yu@samsung.com>2016-11-09 11:15:33 +0900
committerYu Jiung <jiung.yu@samsung.com>2016-11-09 11:15:43 +0900
commitb6627e2c19506bd30328969ea8aab73fa0945f36 (patch)
tree24b768763efadd60f318873601e58dd98fe9714c /m4
parentb8e6c26b7b9608dffc84645f17fe4cf534af18dd (diff)
downloadc-ares-b6627e2c19506bd30328969ea8aab73fa0945f36.tar.gz
c-ares-b6627e2c19506bd30328969ea8aab73fa0945f36.tar.bz2
c-ares-b6627e2c19506bd30328969ea8aab73fa0945f36.zip
Imported Upstream version 1.10.0
Change-Id: Ic7f3b0ad7dca62abe4cfa642a5eb5e190eb7a8c9
Diffstat (limited to 'm4')
-rw-r--r--m4/cares-compilers.m4114
-rw-r--r--m4/cares-confopts.m422
-rw-r--r--m4/cares-functions.m484
-rw-r--r--m4/cares-override.m437
-rw-r--r--m4/cares-system.m483
-rw-r--r--m4/libtool.m4320
-rw-r--r--m4/ltoptions.m419
-rw-r--r--m4/ltversion.m410
-rw-r--r--m4/xc-cc-check.m496
-rw-r--r--m4/xc-lt-iface.m4465
-rw-r--r--m4/xc-val-flgs.m4243
-rw-r--r--m4/zz40-xc-ovr.m4668
-rw-r--r--m4/zz50-xc-ovr.m460
-rw-r--r--m4/zz60-xc-ovr.m464
14 files changed, 2002 insertions, 283 deletions
diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4
index 5d3035c..2b98a68 100644
--- a/m4/cares-compilers.m4
+++ b/m4/cares-compilers.m4
@@ -1,6 +1,6 @@
#***************************************************************************
#
-# Copyright (C) 2009-2011 by Daniel Stenberg et al
+# Copyright (C) 2009-2013 by Daniel Stenberg et al
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
@@ -15,7 +15,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 67
+# serial 75
dnl CARES_CHECK_COMPILER
@@ -23,7 +23,6 @@ dnl -------------------------------------------------
dnl Verify if the C compiler being used is known.
AC_DEFUN([CARES_CHECK_COMPILER], [
- AC_BEFORE([$0],[CARES_CHECK_NO_UNDEFINED])dnl
#
compiler_id="unknown"
compiler_num="0"
@@ -156,6 +155,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_GNU_C], [
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
flags_opt_yes="-O2"
flags_opt_off="-O0"
+ CURL_CHECK_DEF([_WIN32], [], [silent])
else
AC_MSG_RESULT([no])
fi
@@ -850,8 +850,6 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
CLANG)
#
if test "$want_warnings" = "yes"; then
- dnl All versions of clang support the same warnings as at least
- dnl gcc 4.2.1 except -Wunused.
tmp_CFLAGS="$tmp_CFLAGS -pedantic"
tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
@@ -959,6 +957,11 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
fi
#
+ dnl Only gcc 4.0 or later
+ if test "$compiler_num" -ge "400"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
+ fi
+ #
dnl Only gcc 4.2 or later
if test "$compiler_num" -ge "402"; then
tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
@@ -972,6 +975,14 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wconversion -Wno-sign-conversion -Wvla"
fi
#
+ dnl Only gcc 4.5 or later
+ if test "$compiler_num" -ge "405"; then
+ dnl Only windows targets
+ if test "$curl_cv_have_def__WIN32" = "yes"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
+ fi
+ fi
+ #
fi
#
dnl Do not issue warnings for code in system include paths.
@@ -1180,6 +1191,7 @@ dnl shared libraries support undefined symbols, along with
dnl an equally configured libcurl.
AC_DEFUN([CARES_CHECK_CURLDEBUG], [
+ AC_REQUIRE([XC_LIBTOOL])dnl
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
cares_builddir=`pwd`
supports_curldebug="unknown"
@@ -1196,7 +1208,7 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [
fi
if test "$supports_curldebug" != "no"; then
if test "$enable_shared" = "yes" &&
- test "$need_no_undefined" = "yes"; then
+ test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
supports_curldebug="no"
AC_MSG_WARN([shared library does not support undefined symbols.])
fi
@@ -1258,46 +1270,6 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [
])
-dnl CARES_CHECK_NO_UNDEFINED
-dnl -------------------------------------------------
-dnl Checks if the -no-undefined flag must be used when
-dnl building shared libraries. This is required on all
-dnl systems on which shared libraries should not have
-dnl references to undefined symbols. This check should
-dnl not be done before AC-PROG-LIBTOOL.
-
-AC_DEFUN([CARES_CHECK_NO_UNDEFINED], [
- AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
- AC_MSG_CHECKING([if shared libraries need -no-undefined])
- need_no_undefined="no"
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*)
- need_no_undefined="yes"
- ;;
- esac
- if test "x$allow_undefined" = "xno"; then
- need_no_undefined="yes"
- elif test "x$allow_undefined_flag" = "xunsupported"; then
- need_no_undefined="yes"
- fi
- AC_MSG_RESULT($need_no_undefined)
-])
-
-
-dnl CARES_CHECK_PROG_CC
-dnl -------------------------------------------------
-dnl Check for compiler program, preventing CFLAGS and
-dnl CPPFLAGS from being unexpectedly changed.
-
-AC_DEFUN([CARES_CHECK_PROG_CC], [
- ac_save_CFLAGS="$CFLAGS"
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_PROG_CC
- CFLAGS="$ac_save_CFLAGS"
- CPPFLAGS="$ac_save_CPPFLAGS"
-])
-
-
dnl CARES_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
@@ -1425,7 +1397,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [
case "$compiler_id" in
CLANG)
dnl All versions of clang support -fvisibility=
- tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
tmp_CFLAGS="-fvisibility=hidden"
supports_symbol_hiding="yes"
;;
@@ -1433,7 +1405,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [
dnl Only gcc 3.4 or later
if test "$compiler_num" -ge "304"; then
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
- tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
tmp_CFLAGS="-fvisibility=hidden"
supports_symbol_hiding="yes"
fi
@@ -1452,7 +1424,7 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [
printf("icc fvisibility bug test");
]])
],[
- tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
+ tmp_EXTERN="__attribute__ ((__visibility__ (\"default\")))"
tmp_CFLAGS="-fvisibility=hidden"
supports_symbol_hiding="yes"
])
@@ -1484,12 +1456,18 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [
}
]],[[
char b[16];
- char *r = dummy(&b);
+ char *r = dummy(&b[0]);
if(r)
return (int)*r;
]])
],[
supports_symbol_hiding="yes"
+ if test -f conftest.err; then
+ grep 'visibility' conftest.err >/dev/null
+ if test "$?" -eq "0"; then
+ supports_symbol_hiding="no"
+ fi
+ fi
],[
supports_symbol_hiding="no"
echo " " >&6
@@ -1509,6 +1487,42 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [
])
+dnl CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH
+dnl -------------------------------------------------
+dnl Verifies if the compiler actually halts after the
+dnl compilation phase without generating any object
+dnl code file, when the source code tries to redefine
+dnl a prototype which does not match previous one.
+
+AC_DEFUN([CARES_CHECK_COMPILER_PROTOTYPE_MISMATCH], [
+ AC_REQUIRE([CARES_CHECK_COMPILER_HALT_ON_ERROR])dnl
+ AC_MSG_CHECKING([if compiler halts on function prototype mismatch])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+# include <stdlib.h>
+ int rand(int n);
+ int rand(int n)
+ {
+ if(n)
+ return ++n;
+ else
+ return n;
+ }
+ ]],[[
+ int i[2];
+ int j = rand(i[0]);
+ if(j)
+ return j;
+ ]])
+ ],[
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([compiler does not halt on function prototype mismatch.])
+ ],[
+ AC_MSG_RESULT([yes])
+ ])
+])
+
+
dnl CARES_VAR_MATCH (VARNAME, VALUE)
dnl -------------------------------------------------
dnl Verifies if shell variable VARNAME contains VALUE.
diff --git a/m4/cares-confopts.m4 b/m4/cares-confopts.m4
index f2ab45f..9d12a9b 100644
--- a/m4/cares-confopts.m4
+++ b/m4/cares-confopts.m4
@@ -1,7 +1,6 @@
#***************************************************************************
-# $Id$
#
-# Copyright (C) 2008 - 2010 by Daniel Stenberg et al
+# Copyright (C) 2008 - 2013 by Daniel Stenberg et al
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
@@ -16,7 +15,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 9
+# serial 11
dnl CARES_CHECK_OPTION_CURLDEBUG
@@ -67,7 +66,7 @@ dnl variable want_debug value as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
AC_BEFORE([$0],[CARES_CHECK_OPTION_CURLDEBUG])dnl
- AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable debug build options])
OPT_DEBUG_BUILD="default"
AC_ARG_ENABLE(debug,
@@ -132,7 +131,7 @@ dnl shell variable want_optimize value as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_OPTIMIZE], [
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
- AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable compiler optimizer])
OPT_COMPILER_OPTIMIZE="default"
AC_ARG_ENABLE(optimize,
@@ -229,7 +228,7 @@ dnl shell variable want_warnings as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_WARNINGS], [
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
AC_BEFORE([$0],[CARES_CHECK_OPTION_WERROR])dnl
- AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable strict compiler warnings])
OPT_COMPILER_WARNINGS="default"
AC_ARG_ENABLE(warnings,
@@ -330,23 +329,26 @@ dnl -------------------------------------------------
dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding
dnl configure option, and compiler capability to actually honor such
dnl option, this will modify compiler flags as appropriate and also
-dnl provide needed definitions for configuration file.
+dnl provide needed definitions for configuration and Makefile.am files.
dnl This macro should not be used until all compilation tests have
dnl been done to prevent interferences on other tests.
AC_DEFUN([CARES_CONFIGURE_SYMBOL_HIDING], [
AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen])
+ CFLAG_CARES_SYMBOL_HIDING=""
+ doing_symbol_hiding="no"
if test x"$ac_cv_native_windows" != "xyes" &&
test "$want_symbol_hiding" = "yes" &&
test "$supports_symbol_hiding" = "yes"; then
- CFLAGS="$CFLAGS $symbol_hiding_CFLAGS"
- AC_DEFINE_UNQUOTED(CARES_SYMBOL_HIDING, 1,
- [Define to 1 to enable hiding of library internal symbols.])
+ doing_symbol_hiding="yes"
+ CFLAG_CARES_SYMBOL_HIDING="$symbol_hiding_CFLAGS"
AC_DEFINE_UNQUOTED(CARES_SYMBOL_SCOPE_EXTERN, $symbol_hiding_EXTERN,
[Definition to make a library symbol externally visible.])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
+ AM_CONDITIONAL(DOING_CARES_SYMBOL_HIDING, test x$doing_symbol_hiding = xyes)
+ AC_SUBST(CFLAG_CARES_SYMBOL_HIDING)
])
diff --git a/m4/cares-functions.m4 b/m4/cares-functions.m4
index 68d2ba9..7c7c92b 100644
--- a/m4/cares-functions.m4
+++ b/m4/cares-functions.m4
@@ -1,6 +1,6 @@
#***************************************************************************
#
-# Copyright (C) 2008 - 2011 by Daniel Stenberg et al
+# Copyright (C) 2008 - 2012 by Daniel Stenberg et al
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
@@ -15,7 +15,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 43
+# serial 46
dnl CARES_INCLUDES_ARPA_INET
@@ -883,6 +883,7 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
AC_REQUIRE([CARES_INCLUDES_STRING])dnl
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
AC_REQUIRE([CARES_INCLUDES_NETDB])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
#
tst_links_getaddrinfo="unknown"
tst_proto_getaddrinfo="unknown"
@@ -1059,19 +1060,58 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
tst_tsafe_getaddrinfo="yes"
;;
esac
+ if test "$tst_tsafe_getaddrinfo" = "unknown" &&
+ test "$ac_cv_native_windows" = "yes"; then
+ tst_tsafe_getaddrinfo="yes"
+ fi
if test "$tst_tsafe_getaddrinfo" = "unknown"; then
CURL_CHECK_DEF_CC([h_errno], [
- $cares_includes_ws2tcpip
$cares_includes_sys_socket
$cares_includes_netdb
], [silent])
- if test "$curl_cv_have_def_h_errno" = "no"; then
+ if test "$curl_cv_have_def_h_errno" = "yes"; then
+ tst_h_errno_macro="yes"
+ else
+ tst_h_errno_macro="no"
+ fi
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $cares_includes_sys_socket
+ $cares_includes_netdb
+ ]],[[
+ h_errno = 2;
+ if(0 != h_errno)
+ return 1;
+ ]])
+ ],[
+ tst_h_errno_modifiable_lvalue="yes"
+ ],[
+ tst_h_errno_modifiable_lvalue="no"
+ ])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ ]],[[
+#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
+ return 0;
+#elif defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 700)
+ return 0;
+#else
+ force compilation error
+#endif
+ ]])
+ ],[
+ tst_h_errno_sbs_issue_7="yes"
+ ],[
+ tst_h_errno_sbs_issue_7="no"
+ ])
+ if test "$tst_h_errno_macro" = "no" &&
+ test "$tst_h_errno_modifiable_lvalue" = "no" &&
+ test "$tst_h_errno_sbs_issue_7" = "no"; then
tst_tsafe_getaddrinfo="no"
+ else
+ tst_tsafe_getaddrinfo="yes"
fi
fi
- if test "$tst_tsafe_getaddrinfo" = "unknown"; then
- tst_tsafe_getaddrinfo="yes"
- fi
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
if test "$tst_tsafe_getaddrinfo" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
@@ -1368,6 +1408,7 @@ dnl HAVE_GETHOSTNAME will be defined.
AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
AC_REQUIRE([CARES_INCLUDES_UNISTD])dnl
+ AC_REQUIRE([CARES_PREPROCESS_CALLCONV])dnl
#
tst_links_gethostname="unknown"
tst_proto_gethostname="unknown"
@@ -1425,6 +1466,35 @@ AC_DEFUN([CARES_CHECK_FUNC_GETHOSTNAME], [
fi
#
if test "$tst_compi_gethostname" = "yes"; then
+ AC_MSG_CHECKING([for gethostname arg 2 data type])
+ tst_gethostname_type_arg2="unknown"
+ for tst_arg1 in 'char *' 'unsigned char *' 'void *'; do
+ for tst_arg2 in 'int' 'unsigned int' 'size_t'; do
+ if test "$tst_gethostname_type_arg2" = "unknown"; then
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $cares_includes_winsock2
+ $cares_includes_unistd
+ $cares_preprocess_callconv
+ extern int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
+ ]],[[
+ if(0 != gethostname(0, 0))
+ return 1;
+ ]])
+ ],[
+ tst_gethostname_type_arg2="$tst_arg2"
+ ])
+ fi
+ done
+ done
+ AC_MSG_RESULT([$tst_gethostname_type_arg2])
+ if test "$tst_gethostname_type_arg2" != "unknown"; then
+ AC_DEFINE_UNQUOTED(GETHOSTNAME_TYPE_ARG2, $tst_gethostname_type_arg2,
+ [Define to the type of arg 2 for gethostname.])
+ fi
+ fi
+ #
+ if test "$tst_compi_gethostname" = "yes"; then
AC_MSG_CHECKING([if gethostname usage allowed])
if test "x$cares_disallow_gethostname" != "xyes"; then
AC_MSG_RESULT([yes])
diff --git a/m4/cares-override.m4 b/m4/cares-override.m4
index 101ca61..c7400fc 100644
--- a/m4/cares-override.m4
+++ b/m4/cares-override.m4
@@ -1,9 +1,8 @@
#***************************************************************************
-# $Id$
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 4
+# serial 8
dnl CARES_OVERRIDE_AUTOCONF
dnl -------------------------------------------------
@@ -17,16 +16,6 @@ AC_BEFORE([$0],[AC_PROG_LIBTOOL])
# using cares-override.m4
])
-dnl Override some Libtool tests
-dnl -------------------------------------------------
-dnl This is done to prevent Libtool 1.5.X from doing
-dnl unnecesary C++, Fortran and Java tests and reduce
-dnl resulting configure script by nearly 300 Kb.
-
-m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
-m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
-m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
-
dnl Override Autoconf's AC_LANG_PROGRAM (C)
dnl -------------------------------------------------
dnl This is done to prevent compiler warning
@@ -85,27 +74,3 @@ choke me
#endif
], [return $1 ();])])
-dnl Override Autoconf's PATH_SEPARATOR check
-dnl -------------------------------------------------
-dnl This is done to ensure that the same check is
-dnl used across different Autoconf versions and to
-dnl allow us to use this macro early enough in the
-dnl configure script.
-
-m4_defun([_AS_PATH_SEPARATOR_PREPARE],
-[CARES_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
-m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[CARES_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
-dnl Override Autoconf's AC_CONFIG_MACRO_DIR (DIR)
-dnl -------------------------------------------------
-dnl This is an emulation of Autoconf's 2.61 macro.
-dnl This is done to use fixed macro across Autoconf
-dnl versions, and avoid warnings from modern libtool
-dnl which traces usage of this macro.
-
-AC_DEFUN([AC_CONFIG_MACRO_DIR],[:])
-
diff --git a/m4/cares-system.m4 b/m4/cares-system.m4
deleted file mode 100644
index f0adc89..0000000
--- a/m4/cares-system.m4
+++ /dev/null
@@ -1,83 +0,0 @@
-#***************************************************************************
-# $Id$
-#
-# Copyright (C) 2008 - 2009 by Daniel Stenberg et al
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted, provided
-# that the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-#***************************************************************************
-
-# File version for 'aclocal' use. Keep it a single number.
-# serial 3
-
-
-dnl CARES_CHECK_PATH_SEPARATOR
-dnl -------------------------------------------------
-dnl Check and compute the path separator for us. This
-dnl path separator is the symbol used to diferentiate
-dnl or separate paths inside the PATH environment var.
-
-AC_DEFUN([CARES_CHECK_PATH_SEPARATOR], [
- if test -z "$cares_cv_PATH_SEPARATOR"; then
- if test -z "$PATH"; then
- AC_MSG_ERROR([PATH not set. Cannot continue without PATH being set.])
- fi
- dnl Directory count in PATH when using a colon separator.
- tst_dirs_col=0
- tst_save_IFS=$IFS; IFS=':'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1`
- done
- IFS=$tst_save_IFS
- dnl Directory count in PATH when using a semicolon separator.
- tst_dirs_sem=0
- tst_save_IFS=$IFS; IFS=';'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1`
- done
- IFS=$tst_save_IFS
- if test $tst_dirs_sem -eq $tst_dirs_col; then
- dnl When both counting methods give the same result we do not want to
- dnl chose one over the other, and consider auto-detection not possible.
- if test -z "$PATH_SEPARATOR"; then
- dnl Stop dead until user provides PATH_SEPARATOR definition.
- AC_MSG_ERROR([PATH_SEPARATOR not set. Cannot continue without it.])
- fi
- else
- dnl Separator with the greater directory count is the auto-detected one.
- if test $tst_dirs_sem -gt $tst_dirs_col; then
- tst_auto_separator=';'
- else
- tst_auto_separator=':'
- fi
- if test -z "$PATH_SEPARATOR"; then
- dnl Simply use the auto-detected one when not already set.
- PATH_SEPARATOR="$tst_auto_separator"
- fi
- fi
- cares_cv_PATH_SEPARATOR="$PATH_SEPARATOR"
- fi
- AC_SUBST([PATH_SEPARATOR])
- AC_SUBST([PATH])
-])
-
-
-dnl CARES_CHECK_PATH_SEPARATOR_REQUIRED
-dnl -------------------------------------------------
-dnl Use this to ensure that the path separator check
-dnl macro is only expanded and included once.
-
-AC_DEFUN([CARES_CHECK_PATH_SEPARATOR_REQUIRED], [
- AC_REQUIRE([CARES_CHECK_PATH_SEPARATOR])dnl
-])
-
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 8ff3c76..a849b9d 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,8 +1,8 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -11,8 +11,8 @@
m4_define([_LT_COPYING], [dnl
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
@@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
_LT_DECL([], [host_alias], [0], [The host system])dnl
_LT_DECL([], [host], [0])dnl
_LT_DECL([], [host_os], [0])dnl
@@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
configured by $[0], generated by m4_PACKAGE_STRING.
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
gives unlimited permision to copy, distribute and modify it."
@@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG],
m4_case([$1],
[C], [_LT_LANG(C)],
[C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
[Java], [_LT_LANG(GCJ)],
[Fortran 77], [_LT_LANG(F77)],
[Fortran], [_LT_LANG(FC)],
@@ -822,6 +825,31 @@ m4_defun([_LT_LANG],
])# _LT_LANG
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
# _LT_LANG_DEFAULT_CONFIG
# -----------------------
m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
m4_ifdef([LT_PROG_GCJ],
[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
AC_PROVIDE_IFELSE([LT_PROG_RC],
[LT_LANG(RC)],
[m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
_lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
rm -rf libconftest.dylib*
rm -f conftest.*
fi])
+
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
[lt_cv_ld_exported_symbols_list],
[lt_cv_ld_exported_symbols_list=no
@@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
[lt_cv_ld_exported_symbols_list=no])
LDFLAGS="$save_LDFLAGS"
])
+
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
[lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
@@ -990,7 +1030,9 @@ _LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
_lt_result=$?
- if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1035,8 +1077,8 @@ _LT_EOF
])
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
# Checks for linker and compiler features on darwin
m4_defun([_LT_DARWIN_LINKER_FEATURES],
[
@@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
if test "$lt_cv_ld_force_load" = "yes"; then
_LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+ [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
fi
@@ -1280,7 +1324,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
;;
ppc64-*linux*|powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
@@ -1330,14 +1381,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
CFLAGS="$SAVE_CFLAGS"
fi
;;
-sparc*-*solaris*)
+*-*solaris*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD="${LD-ld}_sol2"
+ fi
+ ;;
*)
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
LD="${LD-ld} -64"
@@ -1414,13 +1478,13 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
;;
esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -1600,6 +1664,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=196608
;;
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -1626,7 +1695,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
@@ -1639,7 +1709,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
test $i != 17 # 1/2 MB should be enough
do
@@ -2185,7 +2255,7 @@ need_version=unknown
case $host_os in
aix3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
@@ -2194,7 +2264,7 @@ aix3*)
;;
aix[[4-9]]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
@@ -2259,7 +2329,7 @@ beos*)
;;
bsdi[[45]]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
@@ -2398,7 +2468,7 @@ m4_if([$1], [],[
;;
dgux*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
@@ -2406,10 +2476,6 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -2417,7 +2483,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[[123]]*) objformat=aout ;;
+ freebsd[[23]].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -2435,7 +2501,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2454,19 +2520,8 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
@@ -2527,7 +2582,7 @@ hpux9* | hpux10* | hpux11*)
;;
interix[[3-9]]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
@@ -2543,7 +2598,7 @@ irix5* | irix6* | nonstopux*)
nonstopux*) version_type=nonstopux ;;
*)
if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
fi ;;
@@ -2580,9 +2635,9 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2657,7 +2712,7 @@ netbsd*)
;;
newsos6)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -2726,7 +2781,7 @@ rdos*)
;;
solaris*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2751,7 +2806,7 @@ sunos4*)
;;
sysv4 | sysv4.3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -2775,7 +2830,7 @@ sysv4 | sysv4.3*)
sysv4*MP*)
if test -d /usr/nec ;then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -2806,7 +2861,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
tpf*)
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -2816,7 +2871,7 @@ tpf*)
;;
uts4*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
@@ -3197,10 +3252,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3238,8 +3289,8 @@ irix5* | irix6* | nonstopux*)
lt_cv_deplibs_check_method=pass_all
;;
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3658,6 +3709,7 @@ for ac_symprfx in "" "_"; do
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
@@ -3752,7 +3804,7 @@ static const void *lt_preloaded_setup() {
#endif
_LT_EOF
# Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
+ mv -f conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
LIBS="conftstm.$ac_objext"
@@ -3990,7 +4042,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4242,7 +4294,9 @@ m4_if([$1], [CXX], [
case $cc_basename in
nvcc*) # Cuda Compiler Driver 2.2
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
;;
esac
else
@@ -4287,7 +4341,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -4334,18 +4388,33 @@ m4_if([$1], [CXX], [
;;
*)
case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
_LT_TAGVAR(lt_prog_compiler_wl, $1)=''
;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
*Sun\ C*)
# Sun C 5.9
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
;;
+ *Intel*\ [[CF]]*Compiler*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
esac
;;
esac
@@ -4505,7 +4574,9 @@ m4_if([$1], [CXX], [
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*) ;;
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
@@ -4533,7 +4604,6 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4787,8 +4857,7 @@ _LT_EOF
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
if test "x$supports_anon_versioning" = xyes; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
@@ -5084,6 +5153,7 @@ _LT_EOF
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
# Don't use ranlib
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
@@ -5130,10 +5200,6 @@ _LT_EOF
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
@@ -5146,7 +5212,7 @@ _LT_EOF
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5163,9 +5229,9 @@ _LT_EOF
hpux9*)
if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
fi
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -5185,7 +5251,6 @@ _LT_EOF
fi
if test "$with_gnu_ld" = no; then
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
@@ -5627,9 +5692,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
[Flag to hardcode $libdir into a binary during linking.
This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
[Whether we need a single "-rpath" flag with a separated argument])
_LT_TAGDECL([], [hardcode_direct], [0],
@@ -5787,7 +5849,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -6157,7 +6218,7 @@ if test "$_lt_caught_CXX_error" != yes; then
esac
;;
- freebsd[[12]]*)
+ freebsd2.*)
# C++ shared libraries reported to be fairly broken before
# switch to ELF
_LT_TAGVAR(ld_shlibs, $1)=no
@@ -6173,9 +6234,6 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- gnu*)
- ;;
-
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -6196,7 +6254,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -6209,7 +6267,7 @@ if test "$_lt_caught_CXX_error" != yes; then
;;
*)
if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv -f $output_objdir/$soname $lib'
else
# FIXME: insert proper C++ library support
_LT_TAGVAR(ld_shlibs, $1)=no
@@ -6337,7 +6395,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(inherit_rpath, $1)=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -6345,8 +6403,8 @@ if test "$_lt_caught_CXX_error" != yes; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv -f \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -6549,7 +6607,7 @@ if test "$_lt_caught_CXX_error" != yes; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv -f \$templib $lib'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -6918,12 +6976,18 @@ public class foo {
}
};
_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
])
_lt_libdeps_save_CFLAGS=$CFLAGS
case "$CC $CFLAGS " in #(
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
esac
dnl Parse the compiler output and extract the necessary
@@ -7120,7 +7184,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7253,7 +7316,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
_LT_TAGVAR(hardcode_libdir_separator, $1)=
_LT_TAGVAR(hardcode_minus_L, $1)=no
_LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7440,6 +7502,77 @@ CFLAGS=$lt_save_CFLAGS
])# _LT_LANG_GCJ_CONFIG
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
# _LT_LANG_RC_CONFIG([TAG])
# -------------------------
# Ensure that the configuration variables for the Windows resource compiler
@@ -7509,6 +7642,13 @@ dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
# LT_PROG_RC
# ----------
AC_DEFUN([LT_PROG_RC],
@@ -7614,7 +7754,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
fi
while true; do
cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
+ mv -f conftest.tmp conftest.in
cp conftest.in conftest.nl
echo >>conftest.nl
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 17cfd51..5d9acd8 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index 9c7b5d4..07a8602 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -9,15 +9,15 @@
# @configure_input@
-# serial 3293 ltversion.m4
+# serial 3337 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4])
-m4_define([LT_PACKAGE_REVISION], [1.3293])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4'
-macro_revision='1.3293'
+[macro_version='2.4.2'
+macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/m4/xc-cc-check.m4 b/m4/xc-cc-check.m4
new file mode 100644
index 0000000..cd55405
--- /dev/null
+++ b/m4/xc-cc-check.m4
@@ -0,0 +1,96 @@
+#---------------------------------------------------------------------------
+#
+# xc-cc-check.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_PROG_CC_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC_PREAMBLE], [
+ xc_prog_cc_prev_IFS=$IFS
+ xc_prog_cc_prev_LIBS=$LIBS
+ xc_prog_cc_prev_CFLAGS=$CFLAGS
+ xc_prog_cc_prev_LDFLAGS=$LDFLAGS
+ xc_prog_cc_prev_CPPFLAGS=$CPPFLAGS
+])
+
+
+dnl _XC_PROG_CC_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC_POSTLUDE], [
+ IFS=$xc_prog_cc_prev_IFS
+ LIBS=$xc_prog_cc_prev_LIBS
+ CFLAGS=$xc_prog_cc_prev_CFLAGS
+ LDFLAGS=$xc_prog_cc_prev_LDFLAGS
+ CPPFLAGS=$xc_prog_cc_prev_CPPFLAGS
+ AC_SUBST([CC])dnl
+ AC_SUBST([CPP])dnl
+ AC_SUBST([LIBS])dnl
+ AC_SUBST([CFLAGS])dnl
+ AC_SUBST([LDFLAGS])dnl
+ AC_SUBST([CPPFLAGS])dnl
+])
+
+
+dnl _XC_PROG_CC
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_PROG_CC], [
+ AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl
+ AC_REQUIRE([XC_CHECK_USER_FLAGS])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AM_PROG_CC_C_O])dnl
+ AC_REQUIRE([AC_PROG_CPP])dnl
+ AC_REQUIRE([_XC_PROG_CC_POSTLUDE])dnl
+])
+
+
+dnl XC_CHECK_PROG_CC
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Checks for C compiler and C preprocessor programs,
+dnl while doing some previous sanity validation on user
+dnl provided LIBS, LDFLAGS, CPPFLAGS and CFLAGS values
+dnl that must succeed in order to continue execution.
+dnl
+dnl This sets variables CC and CPP, while preventing
+dnl LIBS, LDFLAGS, CFLAGS, CPPFLAGS and IFS from being
+dnl unexpectedly changed by underlying macros.
+
+AC_DEFUN([XC_CHECK_PROG_CC], [
+ AC_PREREQ([2.50])dnl
+ AC_BEFORE([$0],[_XC_PROG_CC_PREAMBLE])dnl
+ AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+ AC_BEFORE([$0],[AC_PROG_CC])dnl
+ AC_BEFORE([$0],[AM_PROG_CC_C_O])dnl
+ AC_BEFORE([$0],[AC_PROG_CPP])dnl
+ AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+ AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+ AC_BEFORE([$0],[_XC_PROG_CC_POSTLUDE])dnl
+ AC_REQUIRE([_XC_PROG_CC])dnl
+])
+
diff --git a/m4/xc-lt-iface.m4 b/m4/xc-lt-iface.m4
new file mode 100644
index 0000000..0b90d5f
--- /dev/null
+++ b/m4/xc-lt-iface.m4
@@ -0,0 +1,465 @@
+#---------------------------------------------------------------------------
+#
+# xc-lt-iface.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_LIBTOOL_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks some configure script options related with
+dnl libtool and customizes its default behavior before
+dnl libtool code is actually used in script.
+
+m4_define([_XC_LIBTOOL_PREAMBLE],
+[dnl
+# ------------------------------------ #
+# Determine libtool default behavior #
+# ------------------------------------ #
+
+#
+# Default behavior is to enable shared and static libraries on systems
+# where libtool knows how to build both library versions, and does not
+# require separate configuration and build runs for each flavor.
+#
+
+xc_lt_want_enable_shared='yes'
+xc_lt_want_enable_static='yes'
+
+#
+# User may have disabled shared or static libraries.
+#
+case "x$enable_shared" in @%:@ (
+ xno)
+ xc_lt_want_enable_shared='no'
+ ;;
+esac
+case "x$enable_static" in @%:@ (
+ xno)
+ xc_lt_want_enable_static='no'
+ ;;
+esac
+if test "x$xc_lt_want_enable_shared" = 'xno' &&
+ test "x$xc_lt_want_enable_static" = 'xno'; then
+ AC_MSG_ERROR([can not disable shared and static libraries simultaneously])
+fi
+
+#
+# Default behavior on systems that require independent configuration
+# and build runs for shared and static is to enable shared libraries
+# and disable static ones. On these systems option '--disable-shared'
+# must be used in order to build a proper static library.
+#
+
+if test "x$xc_lt_want_enable_shared" = 'xyes' &&
+ test "x$xc_lt_want_enable_static" = 'xyes'; then
+ case $host_os in @%:@ (
+ mingw* | pw32* | cegcc* | os2* | aix*)
+ xc_lt_want_enable_static='no'
+ ;;
+ esac
+fi
+
+#
+# Make libtool aware of current shared and static library preferences
+# taking in account that, depending on host characteristics, libtool
+# may modify these option preferences later in this configure script.
+#
+
+enable_shared=$xc_lt_want_enable_shared
+enable_static=$xc_lt_want_enable_static
+
+#
+# Default behavior is to build PIC objects for shared libraries and
+# non-PIC objects for static libraries.
+#
+
+xc_lt_want_with_pic='default'
+
+#
+# User may have specified PIC preference.
+#
+
+case "x$with_pic" in @%:@ ((
+ xno)
+ xc_lt_want_with_pic='no'
+ ;;
+ xyes)
+ xc_lt_want_with_pic='yes'
+ ;;
+esac
+
+#
+# Default behavior on some systems where building a shared library out
+# of non-PIC compiled objects will fail with following linker error
+# "relocation R_X86_64_32 can not be used when making a shared object"
+# is to build PIC objects even for static libraries. This behavior may
+# be overriden using 'configure --disable-shared --without-pic'.
+#
+
+if test "x$xc_lt_want_with_pic" = 'xdefault'; then
+ case $host_cpu in @%:@ (
+ x86_64 | amd64 | ia64)
+ case $host_os in @%:@ (
+ linux* | freebsd*)
+ xc_lt_want_with_pic='yes'
+ ;;
+ esac
+ ;;
+ esac
+fi
+
+#
+# Make libtool aware of current PIC preference taking in account that,
+# depending on host characteristics, libtool may modify PIC default
+# behavior to fit host system idiosyncrasies later in this script.
+#
+
+with_pic=$xc_lt_want_with_pic
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_LIBTOOL_BODY
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl This macro performs embedding of libtool code into
+dnl configure script, regardless of libtool version in
+dnl use when generating configure script.
+
+m4_define([_XC_LIBTOOL_BODY],
+[dnl
+## ----------------------- ##
+## Start of libtool code ##
+## ----------------------- ##
+m4_ifdef([LT_INIT],
+[dnl
+LT_INIT([win32-dll])
+],[dnl
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+])dnl
+## --------------------- ##
+## End of libtool code ##
+## --------------------- ##
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_LIBRARIES
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether libtool shared and static libraries
+dnl are finally built depending on user input, default
+dnl behavior and knowledge that libtool has about host
+dnl characteristics.
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared
+dnl xc_lt_build_static
+
+m4_define([_XC_CHECK_LT_BUILD_LIBRARIES],
+[dnl
+#
+# Verify if finally libtool shared libraries will be built
+#
+
+case "x$enable_shared" in @%:@ ((
+ xyes | xno)
+ xc_lt_build_shared=$enable_shared
+ ;;
+ *)
+ AC_MSG_ERROR([unexpected libtool enable_shared value: $enable_shared])
+ ;;
+esac
+
+#
+# Verify if finally libtool static libraries will be built
+#
+
+case "x$enable_static" in @%:@ ((
+ xyes | xno)
+ xc_lt_build_static=$enable_static
+ ;;
+ *)
+ AC_MSG_ERROR([unexpected libtool enable_static value: $enable_static])
+ ;;
+esac
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_VERSION_INFO
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -version-info linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_version_info.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_VERSION_INFO],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -version-info
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -version-info])
+xc_lt_shlib_use_version_info='yes'
+if test "x$version_type" = 'xnone'; then
+ xc_lt_shlib_use_version_info='no'
+fi
+case $host_os in @%:@ (
+ amigaos*)
+ xc_lt_shlib_use_version_info='yes'
+ ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_version_info])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -no-undefined linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_no_undefined.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -no-undefined
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -no-undefined])
+xc_lt_shlib_use_no_undefined='no'
+if test "x$allow_undefined" = 'xno'; then
+ xc_lt_shlib_use_no_undefined='yes'
+elif test "x$allow_undefined_flag" = 'xunsupported'; then
+ xc_lt_shlib_use_no_undefined='yes'
+fi
+case $host_os in @%:@ (
+ cygwin* | mingw* | pw32* | cegcc* | os2* | aix*)
+ xc_lt_shlib_use_no_undefined='yes'
+ ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_no_undefined])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks if the -mimpure-text linker flag must be
+dnl provided when building libtool shared libraries.
+dnl Result stored in xc_lt_shlib_use_mimpure_text.
+
+m4_define([_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT],
+[dnl
+#
+# Verify if libtool shared libraries should be linked using flag -mimpure-text
+#
+
+AC_MSG_CHECKING([whether to build shared libraries with -mimpure-text])
+xc_lt_shlib_use_mimpure_text='no'
+case $host_os in @%:@ (
+ solaris2*)
+ if test "x$GCC" = 'xyes'; then
+ xc_lt_shlib_use_mimpure_text='yes'
+ fi
+ ;;
+esac
+AC_MSG_RESULT([$xc_lt_shlib_use_mimpure_text])
+dnl
+m4_define([$0], [])[]dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_WITH_PIC
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether libtool shared and static libraries
+dnl would be built with PIC depending on user input,
+dnl default behavior and knowledge that libtool has
+dnl about host characteristics.
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared_with_pic
+dnl xc_lt_build_static_with_pic
+
+m4_define([_XC_CHECK_LT_BUILD_WITH_PIC],
+[dnl
+#
+# Find out wether libtool libraries would be built wit PIC
+#
+
+case "x$pic_mode" in @%:@ ((((
+ xdefault)
+ xc_lt_build_shared_with_pic='yes'
+ xc_lt_build_static_with_pic='no'
+ ;;
+ xyes)
+ xc_lt_build_shared_with_pic='yes'
+ xc_lt_build_static_with_pic='yes'
+ ;;
+ xno)
+ xc_lt_build_shared_with_pic='no'
+ xc_lt_build_static_with_pic='no'
+ ;;
+ *)
+ xc_lt_build_shared_with_pic='unknown'
+ xc_lt_build_static_with_pic='unknown'
+ AC_MSG_WARN([unexpected libtool pic_mode value: $pic_mode])
+ ;;
+esac
+AC_MSG_CHECKING([whether to build shared libraries with PIC])
+AC_MSG_RESULT([$xc_lt_build_shared_with_pic])
+AC_MSG_CHECKING([whether to build static libraries with PIC])
+AC_MSG_RESULT([$xc_lt_build_static_with_pic])
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_CHECK_LT_BUILD_SINGLE_VERSION
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Checks wether a libtool shared or static library
+dnl is finally built exclusively without the other.
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared_only
+dnl xc_lt_build_static_only
+
+m4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
+[dnl
+#
+# Verify if libtool shared libraries will be built while static not built
+#
+
+AC_MSG_CHECKING([whether to build shared libraries only])
+if test "$xc_lt_build_shared" = 'yes' &&
+ test "$xc_lt_build_static" = 'no'; then
+ xc_lt_build_shared_only='yes'
+else
+ xc_lt_build_shared_only='no'
+fi
+AC_MSG_RESULT([$xc_lt_build_shared_only])
+
+#
+# Verify if libtool static libraries will be built while shared not built
+#
+
+AC_MSG_CHECKING([whether to build static libraries only])
+if test "$xc_lt_build_static" = 'yes' &&
+ test "$xc_lt_build_shared" = 'no'; then
+ xc_lt_build_static_only='yes'
+else
+ xc_lt_build_static_only='no'
+fi
+AC_MSG_RESULT([$xc_lt_build_static_only])
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl _XC_LIBTOOL_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Performs several checks related with libtool that
+dnl can not be done unless libtool code has already
+dnl been executed. See individual check descriptions
+dnl for further info.
+
+m4_define([_XC_LIBTOOL_POSTLUDE],
+[dnl
+_XC_CHECK_LT_BUILD_LIBRARIES
+_XC_CHECK_LT_SHLIB_USE_VERSION_INFO
+_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
+_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
+_XC_CHECK_LT_BUILD_WITH_PIC
+_XC_CHECK_LT_BUILD_SINGLE_VERSION
+dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl XC_LIBTOOL
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro embeds libtool machinery into configure
+dnl script, regardless of libtool version, and performs
+dnl several additional checks whose results can be used
+dnl later on.
+dnl
+dnl Usage of this macro ensures that generated configure
+dnl script uses equivalent logic irrespective of autoconf
+dnl or libtool version being used to generate configure
+dnl script.
+dnl
+dnl Results stored in following shell variables:
+dnl xc_lt_build_shared
+dnl xc_lt_build_static
+dnl xc_lt_shlib_use_version_info
+dnl xc_lt_shlib_use_no_undefined
+dnl xc_lt_shlib_use_mimpure_text
+dnl xc_lt_build_shared_with_pic
+dnl xc_lt_build_static_with_pic
+dnl xc_lt_build_shared_only
+dnl xc_lt_build_static_only
+
+AC_DEFUN([XC_LIBTOOL],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([XC_CHECK_PATH_SEPARATOR])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+dnl
+_XC_LIBTOOL_PREAMBLE
+_XC_LIBTOOL_BODY
+_XC_LIBTOOL_POSTLUDE
+dnl
+m4_ifdef([AC_LIBTOOL_WIN32_DLL],
+ [m4_undefine([AC_LIBTOOL_WIN32_DLL])])dnl
+m4_ifdef([AC_PROG_LIBTOOL],
+ [m4_undefine([AC_PROG_LIBTOOL])])dnl
+m4_ifdef([LT_INIT],
+ [m4_undefine([LT_INIT])])dnl
+dnl
+m4_define([$0],[])dnl
+])
+
diff --git a/m4/xc-val-flgs.m4 b/m4/xc-val-flgs.m4
new file mode 100644
index 0000000..81d1eac
--- /dev/null
+++ b/m4/xc-val-flgs.m4
@@ -0,0 +1,243 @@
+#---------------------------------------------------------------------------
+#
+# xc-val-flgs.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl _XC_CHECK_VAR_LIBS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_LIBS], [
+ xc_bad_var_libs=no
+ for xc_word in $LIBS; do
+ case "$xc_word" in
+ -l* | --library=*)
+ :
+ ;;
+ *)
+ xc_bad_var_libs=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_libs = yes; then
+ AC_MSG_NOTICE([using LIBS: $LIBS])
+ AC_MSG_NOTICE([LIBS error: LIBS may only be used to specify libraries (-lname).])
+ fi
+])
+
+
+dnl _XC_CHECK_VAR_LDFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_LDFLAGS], [
+ xc_bad_var_ldflags=no
+ for xc_word in $LDFLAGS; do
+ case "$xc_word" in
+ -D*)
+ xc_bad_var_ldflags=yes
+ ;;
+ -U*)
+ xc_bad_var_ldflags=yes
+ ;;
+ -I*)
+ xc_bad_var_ldflags=yes
+ ;;
+ -l* | --library=*)
+ xc_bad_var_ldflags=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_ldflags = yes; then
+ AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
+ xc_bad_var_msg="LDFLAGS error: LDFLAGS may only be used to specify linker flags, not"
+ for xc_word in $LDFLAGS; do
+ case "$xc_word" in
+ -D*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -U*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -I*)
+ AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word])
+ ;;
+ -l* | --library=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+ ;;
+ esac
+ done
+ fi
+])
+
+
+dnl _XC_CHECK_VAR_CPPFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_CPPFLAGS], [
+ xc_bad_var_cppflags=no
+ for xc_word in $CPPFLAGS; do
+ case "$xc_word" in
+ -rpath*)
+ xc_bad_var_cppflags=yes
+ ;;
+ -L* | --library-path=*)
+ xc_bad_var_cppflags=yes
+ ;;
+ -l* | --library=*)
+ xc_bad_var_cppflags=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_cppflags = yes; then
+ AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
+ xc_bad_var_msg="CPPFLAGS error: CPPFLAGS may only be used to specify C preprocessor flags, not"
+ for xc_word in $CPPFLAGS; do
+ case "$xc_word" in
+ -rpath*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -L* | --library-path=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -l* | --library=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+ ;;
+ esac
+ done
+ fi
+])
+
+
+dnl _XC_CHECK_VAR_CFLAGS
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CHECK_VAR_CFLAGS], [
+ xc_bad_var_cflags=no
+ for xc_word in $CFLAGS; do
+ case "$xc_word" in
+ -D*)
+ xc_bad_var_cflags=yes
+ ;;
+ -U*)
+ xc_bad_var_cflags=yes
+ ;;
+ -I*)
+ xc_bad_var_cflags=yes
+ ;;
+ -rpath*)
+ xc_bad_var_cflags=yes
+ ;;
+ -L* | --library-path=*)
+ xc_bad_var_cflags=yes
+ ;;
+ -l* | --library=*)
+ xc_bad_var_cflags=yes
+ ;;
+ esac
+ done
+ if test $xc_bad_var_cflags = yes; then
+ AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
+ xc_bad_var_msg="CFLAGS error: CFLAGS may only be used to specify C compiler flags, not"
+ for xc_word in $CFLAGS; do
+ case "$xc_word" in
+ -D*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro definitions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -U*)
+ AC_MSG_NOTICE([$xc_bad_var_msg macro suppressions. Use CPPFLAGS for: $xc_word])
+ ;;
+ -I*)
+ AC_MSG_NOTICE([$xc_bad_var_msg include directories. Use CPPFLAGS for: $xc_word])
+ ;;
+ -rpath*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library runtime directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -L* | --library-path=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg library directories. Use LDFLAGS for: $xc_word])
+ ;;
+ -l* | --library=*)
+ AC_MSG_NOTICE([$xc_bad_var_msg libraries. Use LIBS for: $xc_word])
+ ;;
+ esac
+ done
+ fi
+])
+
+
+dnl XC_CHECK_USER_FLAGS
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Performs some sanity checks for LIBS, LDFLAGS,
+dnl CPPFLAGS and CFLAGS values that the user might
+dnl have set. When checks fails, user is noticed
+dnl about errors detected in all of them and script
+dnl execution is halted.
+dnl
+dnl Intended to be used early in configure script.
+
+AC_DEFUN([XC_CHECK_USER_FLAGS], [
+ AC_PREREQ([2.50])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
+ dnl check order below matters
+ _XC_CHECK_VAR_LIBS
+ _XC_CHECK_VAR_LDFLAGS
+ _XC_CHECK_VAR_CPPFLAGS
+ _XC_CHECK_VAR_CFLAGS
+ if test $xc_bad_var_libs = yes ||
+ test $xc_bad_var_cflags = yes ||
+ test $xc_bad_var_ldflags = yes ||
+ test $xc_bad_var_cppflags = yes; then
+ AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.])
+ fi
+])
+
+
+dnl XC_CHECK_BUILD_FLAGS
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Performs some sanity checks for LIBS, LDFLAGS,
+dnl CPPFLAGS and CFLAGS values that the configure
+dnl script might have set. When checks fails, user
+dnl is noticed about errors detected in all of them
+dnl but script continues execution.
+dnl
+dnl Intended to be used very late in configure script.
+
+AC_DEFUN([XC_CHECK_BUILD_FLAGS], [
+ AC_PREREQ([2.50])dnl
+ dnl check order below matters
+ _XC_CHECK_VAR_LIBS
+ _XC_CHECK_VAR_LDFLAGS
+ _XC_CHECK_VAR_CPPFLAGS
+ _XC_CHECK_VAR_CFLAGS
+ if test $xc_bad_var_libs = yes ||
+ test $xc_bad_var_cflags = yes ||
+ test $xc_bad_var_ldflags = yes ||
+ test $xc_bad_var_cppflags = yes; then
+ AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.])
+ fi
+])
+
diff --git a/m4/zz40-xc-ovr.m4 b/m4/zz40-xc-ovr.m4
new file mode 100644
index 0000000..0e3b1cb
--- /dev/null
+++ b/m4/zz40-xc-ovr.m4
@@ -0,0 +1,668 @@
+#---------------------------------------------------------------------------
+#
+# zz40-xc-ovr.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Version macros
+dnl -------------------------------------------------
+dnl Public macros.
+
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MAJOR],[1])dnl
+m4_define([XC_CONFIGURE_PREAMBLE_VER_MINOR],[0])dnl
+
+
+dnl _XC_CFG_PRE_PREAMBLE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CFG_PRE_PREAMBLE],
+[
+## -------------------------------- ##
+@%:@@%:@ [XC_CONFIGURE_PREAMBLE] ver: []dnl
+XC_CONFIGURE_PREAMBLE_VER_MAJOR.[]dnl
+XC_CONFIGURE_PREAMBLE_VER_MINOR ##
+## -------------------------------- ##
+
+xc_configure_preamble_ver_major='XC_CONFIGURE_PREAMBLE_VER_MAJOR'
+xc_configure_preamble_ver_minor='XC_CONFIGURE_PREAMBLE_VER_MINOR'
+
+#
+# Set IFS to space, tab and newline.
+#
+
+xc_space=' '
+xc_tab=' '
+xc_newline='
+'
+IFS="$xc_space$xc_tab$xc_newline"
+
+#
+# Set internationalization behavior variables.
+#
+
+LANG='C'
+LC_ALL='C'
+LANGUAGE='C'
+export LANG
+export LC_ALL
+export LANGUAGE
+
+#
+# Some useful variables.
+#
+
+xc_msg_warn='configure: WARNING:'
+xc_msg_abrt='Can not continue.'
+xc_msg_err='configure: error:'
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_ECHO
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'echo' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+#
+# Verify that 'echo' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ # Try built-in echo, and fail.
+ echo "$xc_msg_err 'echo' command not found. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_TEST
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'test' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_TEST],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+#
+# Verify that 'test' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$xc_tst_str" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'test' command not found. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_VAR_PATH
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'PATH' variable
+dnl is set, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_VAR_PATH],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+#
+# Verify that 'PATH' variable is set, otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`test -n "$PATH" >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'PATH' variable not set. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_CMD_EXPR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'expr' command
+dnl is available, otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'expr' command is available, otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`expr "$xc_tst_str" : '.*' 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ x7)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'expr' command not found. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_SED
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'sed' utility
+dnl is found within 'PATH', otherwise aborts execution.
+dnl
+dnl This 'sed' is required in order to allow configure
+dnl script bootstrapping itself. No fancy testing for a
+dnl proper 'sed' this early, that should be done later.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_SED],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'sed' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+ | sed -e 's:unknown:success:' 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'sed' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_GREP
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'grep' utility
+dnl is found within 'PATH', otherwise aborts execution.
+dnl
+dnl This 'grep' is required in order to allow configure
+dnl script bootstrapping itself. No fancy testing for a
+dnl proper 'grep' this early, that should be done later.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'grep' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+(`echo "$xc_tst_str" 2>/dev/null \
+ | grep 'unknown' >/dev/null 2>&1`) && xc_tst_str='success'
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'grep' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_TR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'tr' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_TR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+#
+# Verify that 'tr' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str="${xc_tab}98s7u6c5c4e3s2s10"
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+ | tr -d "0123456789$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ xsuccess)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'tr' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_WC
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'wc' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_WC],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+#
+# Verify that 'wc' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown unknown unknown unknown'
+xc_tst_str=`echo "$xc_tst_str" 2>/dev/null \
+ | wc -w 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null`
+case "x$xc_tst_str" in @%:@ ((
+ x4)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'wc' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_BASIC_CHK_UTIL_CAT
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that verifies that 'cat' utility
+dnl is found within 'PATH', otherwise aborts execution.
+
+AC_DEFUN([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+#
+# Verify that 'cat' utility is found within 'PATH', otherwise abort.
+#
+
+xc_tst_str='unknown'
+xc_tst_str=`cat <<_EOT 2>/dev/null \
+ | wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null
+unknown
+unknown
+unknown
+_EOT`
+case "x$xc_tst_str" in @%:@ ((
+ x3)
+ :
+ ;;
+ *)
+ echo "$xc_msg_err 'cat' utility not found in 'PATH'. $xc_msg_abrt" >&2
+ exit 1
+ ;;
+esac
+])
+
+
+dnl _XC_CFG_PRE_CHECK_PATH_SEPARATOR
+dnl -------------------------------------------------
+dnl Private macro.
+dnl
+dnl Emits shell code that computes the path separator
+dnl and stores the result in 'PATH_SEPARATOR', unless
+dnl the user has already set it with a non-empty value.
+dnl
+dnl This path separator is the symbol used to separate
+dnl or diferentiate paths inside the 'PATH' environment
+dnl variable.
+dnl
+dnl Non-empty user provided 'PATH_SEPARATOR' always
+dnl overrides the auto-detected one.
+
+AC_DEFUN([_XC_CFG_PRE_CHECK_PATH_SEPARATOR],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+#
+# Auto-detect and set 'PATH_SEPARATOR', unless it is already non-empty set.
+#
+
+# Directory count in 'PATH' when using a colon separator.
+xc_tst_dirs_col='x'
+xc_tst_prev_IFS=$IFS; IFS=':'
+for xc_tst_dir in $PATH; do
+ IFS=$xc_tst_prev_IFS
+ xc_tst_dirs_col="x$xc_tst_dirs_col"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_col=`expr "$xc_tst_dirs_col" : '.*'`
+
+# Directory count in 'PATH' when using a semicolon separator.
+xc_tst_dirs_sem='x'
+xc_tst_prev_IFS=$IFS; IFS=';'
+for xc_tst_dir in $PATH; do
+ IFS=$xc_tst_prev_IFS
+ xc_tst_dirs_sem="x$xc_tst_dirs_sem"
+done
+IFS=$xc_tst_prev_IFS
+xc_tst_dirs_sem=`expr "$xc_tst_dirs_sem" : '.*'`
+
+if test $xc_tst_dirs_sem -eq $xc_tst_dirs_col; then
+ # When both counting methods give the same result we do not want to
+ # chose one over the other, and consider auto-detection not possible.
+ if test -z "$PATH_SEPARATOR"; then
+ # Stop dead until user provides 'PATH_SEPARATOR' definition.
+ echo "$xc_msg_err 'PATH_SEPARATOR' variable not set. $xc_msg_abrt" >&2
+ exit 1
+ fi
+else
+ # Separator with the greater directory count is the auto-detected one.
+ if test $xc_tst_dirs_sem -gt $xc_tst_dirs_col; then
+ xc_tst_auto_separator=';'
+ else
+ xc_tst_auto_separator=':'
+ fi
+ if test -z "$PATH_SEPARATOR"; then
+ # Simply use the auto-detected one when not already set.
+ PATH_SEPARATOR=$xc_tst_auto_separator
+ elif test "x$PATH_SEPARATOR" != "x$xc_tst_auto_separator"; then
+ echo "$xc_msg_warn 'PATH_SEPARATOR' does not match auto-detected one." >&2
+ fi
+fi
+xc_PATH_SEPARATOR=$PATH_SEPARATOR
+AC_SUBST([PATH_SEPARATOR])dnl
+])
+
+
+dnl _XC_CFG_PRE_POSTLUDE
+dnl -------------------------------------------------
+dnl Private macro.
+
+AC_DEFUN([_XC_CFG_PRE_POSTLUDE],
+[dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+dnl
+xc_configure_preamble_result='yes'
+])
+
+
+dnl XC_CONFIGURE_PREAMBLE
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl This macro emits shell code which does some
+dnl very basic checks related with the availability
+dnl of some commands and utilities needed to allow
+dnl configure script bootstrapping itself when using
+dnl these to figure out other settings. Also emits
+dnl code that performs PATH_SEPARATOR auto-detection
+dnl and sets its value unless it is already set with
+dnl a non-empty value.
+dnl
+dnl These basic checks are intended to be placed and
+dnl executed as early as possible in the resulting
+dnl configure script, and as such these must be pure
+dnl and portable shell code.
+dnl
+dnl This macro may be used directly, or indirectly
+dnl when using other macros that AC_REQUIRE it such
+dnl as XC_CHECK_PATH_SEPARATOR.
+dnl
+dnl Currently the mechanism used to ensure that this
+dnl macro expands early enough in generated configure
+dnl script is making it override autoconf and libtool
+dnl PATH_SEPARATOR check.
+
+AC_DEFUN([XC_CONFIGURE_PREAMBLE],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_PREAMBLE])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+AC_BEFORE([$0],[_XC_CFG_PRE_POSTLUDE])dnl
+dnl
+AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
+AC_BEFORE([$0],[AC_CHECK_PROG])dnl
+AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
+AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PATH_TOOL])dnl
+AC_BEFORE([$0],[AC_PATH_PROG])dnl
+AC_BEFORE([$0],[AC_PATH_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PROG_SED])dnl
+AC_BEFORE([$0],[AC_PROG_GREP])dnl
+AC_BEFORE([$0],[AC_PROG_LN_S])dnl
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
+AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([_XC_CFG_PRE_PREAMBLE])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_ECHO])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_TEST])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_VAR_PATH])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_CMD_EXPR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_SED])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_GREP])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_TR])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_WC])dnl
+AC_REQUIRE([_XC_CFG_PRE_BASIC_CHK_UTIL_CAT])dnl
+AC_REQUIRE([_XC_CFG_PRE_CHECK_PATH_SEPARATOR])dnl
+AC_REQUIRE([_XC_CFG_PRE_POSTLUDE])dnl
+dnl
+m4_pattern_forbid([^_*XC])dnl
+m4_define([$0],[])dnl
+])
+
+
+dnl Override autoconf and libtool PATH_SEPARATOR check
+dnl -------------------------------------------------
+dnl Macros overriding.
+dnl
+dnl This is done to ensure that the same check is
+dnl used across different autoconf versions and to
+dnl allow expansion of XC_CONFIGURE_PREAMBLE macro
+dnl early enough in the generated configure script.
+
+dnl
+dnl Override when using autoconf 2.53 and newer.
+dnl
+
+m4_ifdef([_AS_PATH_SEPARATOR_PREPARE],
+[dnl
+m4_undefine([_AS_PATH_SEPARATOR_PREPARE])dnl
+m4_defun([_AS_PATH_SEPARATOR_PREPARE],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+m4_define([$0],[])dnl
+])dnl
+])
+
+dnl
+dnl Override when using autoconf 2.50 to 2.52
+dnl
+
+m4_ifdef([_AC_INIT_PREPARE_FS_SEPARATORS],
+[dnl
+m4_undefine([_AC_INIT_PREPARE_FS_SEPARATORS])dnl
+m4_defun([_AC_INIT_PREPARE_FS_SEPARATORS],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+ac_path_separator=$PATH_SEPARATOR
+m4_define([$0],[])dnl
+])dnl
+])
+
+dnl
+dnl Override when using libtool 1.4.2
+dnl
+
+m4_ifdef([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[dnl
+m4_undefine([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+lt_cv_sys_path_separator=$PATH_SEPARATOR
+m4_define([$0],[])dnl
+])dnl
+])
+
+
+dnl XC_CHECK_PATH_SEPARATOR
+dnl -------------------------------------------------
+dnl Public macro.
+dnl
+dnl Usage of this macro ensures that generated configure
+dnl script uses the same PATH_SEPARATOR check irrespective
+dnl of autoconf or libtool version being used to generate
+dnl configure script.
+dnl
+dnl Emits shell code that computes the path separator
+dnl and stores the result in 'PATH_SEPARATOR', unless
+dnl the user has already set it with a non-empty value.
+dnl
+dnl This path separator is the symbol used to separate
+dnl or diferentiate paths inside the 'PATH' environment
+dnl variable.
+dnl
+dnl Non-empty user provided 'PATH_SEPARATOR' always
+dnl overrides the auto-detected one.
+dnl
+dnl Strictly speaking the check is done in two steps. The
+dnl first, which does the actual check, takes place in
+dnl XC_CONFIGURE_PREAMBLE macro and happens very early in
+dnl generated configure script. The second one shows and
+dnl logs the result of the check into config.log at a later
+dnl configure stage. Placement of this second stage in
+dnl generated configure script will be done where first
+dnl direct or indirect usage of this macro happens.
+
+AC_DEFUN([XC_CHECK_PATH_SEPARATOR],
+[dnl
+AC_PREREQ([2.50])dnl
+dnl
+AC_BEFORE([$0],[AC_CHECK_TOOL])dnl
+AC_BEFORE([$0],[AC_CHECK_PROG])dnl
+AC_BEFORE([$0],[AC_CHECK_TOOLS])dnl
+AC_BEFORE([$0],[AC_CHECK_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PATH_TOOL])dnl
+AC_BEFORE([$0],[AC_PATH_PROG])dnl
+AC_BEFORE([$0],[AC_PATH_PROGS])dnl
+dnl
+AC_BEFORE([$0],[AC_PROG_SED])dnl
+AC_BEFORE([$0],[AC_PROG_GREP])dnl
+AC_BEFORE([$0],[AC_PROG_LN_S])dnl
+AC_BEFORE([$0],[AC_PROG_MKDIR_P])dnl
+AC_BEFORE([$0],[AC_PROG_INSTALL])dnl
+AC_BEFORE([$0],[AC_PROG_MAKE_SET])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+dnl
+AC_REQUIRE([XC_CONFIGURE_PREAMBLE])dnl
+dnl
+#
+# Check that 'XC_CONFIGURE_PREAMBLE' has already run.
+#
+
+if test -z "$xc_configure_preamble_result"; then
+ AC_MSG_ERROR([xc_configure_preamble_result not set (internal problem)])
+fi
+
+#
+# Check that 'PATH_SEPARATOR' has already been set.
+#
+
+if test -z "$xc_PATH_SEPARATOR"; then
+ AC_MSG_ERROR([xc_PATH_SEPARATOR not set (internal problem)])
+fi
+if test -z "$PATH_SEPARATOR"; then
+ AC_MSG_ERROR([PATH_SEPARATOR not set (internal or config.site problem)])
+fi
+AC_MSG_CHECKING([for path separator])
+AC_MSG_RESULT([$PATH_SEPARATOR])
+if test "x$PATH_SEPARATOR" != "x$xc_PATH_SEPARATOR"; then
+ AC_MSG_CHECKING([for initial path separator])
+ AC_MSG_RESULT([$xc_PATH_SEPARATOR])
+ AC_MSG_ERROR([path separator mismatch (internal or config.site problem)])
+fi
+dnl
+m4_pattern_forbid([^_*XC])dnl
+m4_define([$0],[])dnl
+])
+
diff --git a/m4/zz50-xc-ovr.m4 b/m4/zz50-xc-ovr.m4
new file mode 100644
index 0000000..7e9ae59
--- /dev/null
+++ b/m4/zz50-xc-ovr.m4
@@ -0,0 +1,60 @@
+#---------------------------------------------------------------------------
+#
+# zz50-xc-ovr.m4
+#
+# Copyright (c) 2011 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Override some language related macros
+dnl -------------------------------------------------
+dnl This is done to prevent Libtool 1.5.X from doing
+dnl unnecesary C++, Fortran and Java tests when only
+dnl using C language and reduce resulting configure
+dnl script by nearly 300 Kb.
+
+m4_ifdef([AC_LIBTOOL_LANG_CXX_CONFIG],
+ [m4_undefine([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_CXX_CONFIG],[:])
+
+m4_ifdef([AC_LIBTOOL_LANG_F77_CONFIG],
+ [m4_undefine([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_F77_CONFIG],[:])
+
+m4_ifdef([AC_LIBTOOL_LANG_GCJ_CONFIG],
+ [m4_undefine([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])
+
+
+dnl XC_OVR_ZZ50
+dnl -------------------------------------------------
+dnl Placing a call to this macro in configure.ac will
+dnl make macros in this file visible to other macros
+dnl used for same configure script, overriding those
+dnl provided elsewhere.
+
+AC_DEFUN([XC_OVR_ZZ50],
+ [AC_BEFORE([$0],[AC_PROG_LIBTOOL])])
+
diff --git a/m4/zz60-xc-ovr.m4 b/m4/zz60-xc-ovr.m4
new file mode 100644
index 0000000..959f118
--- /dev/null
+++ b/m4/zz60-xc-ovr.m4
@@ -0,0 +1,64 @@
+#---------------------------------------------------------------------------
+#
+# zz60-xc-ovr.m4
+#
+# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+#---------------------------------------------------------------------------
+
+# serial 1
+
+
+dnl The funny name of this file is intentional in order to make it
+dnl sort alphabetically after any libtool, autoconf or automake
+dnl provided .m4 macro file that might get copied into this same
+dnl subdirectory. This allows that macro (re)definitions from this
+dnl file may override those provided in other files.
+
+
+dnl Override an autoconf provided macro
+dnl -------------------------------------------------
+dnl This macro overrides the one provided by autoconf
+dnl 2.58 or newer, and provides macro definition for
+dnl autoconf 2.57 or older which lack it. This allows
+dnl using libtool 2.2 or newer, which requires that
+dnl this macro is used in configure.ac, with autoconf
+dnl 2.57 or older.
+
+m4_ifdef([AC_CONFIG_MACRO_DIR],
+[dnl
+m4_undefine([AC_CONFIG_MACRO_DIR])dnl
+])
+m4_define([AC_CONFIG_MACRO_DIR],[])
+
+
+dnl XC_OVR_ZZ60
+dnl -------------------------------------------------
+dnl Placing a call to this macro in configure.ac will
+dnl make macros in this file visible to other macros
+dnl used for same configure script, overriding those
+dnl provided elsewhere.
+
+AC_DEFUN([XC_OVR_ZZ60],
+[dnl
+AC_BEFORE([$0],[LT_INIT])dnl
+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
+dnl
+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIR])dnl
+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIRS])dnl
+])
+