aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-compilers.m464
-rw-r--r--m4/curl-confopts.m465
-rw-r--r--m4/curl-functions.m491
-rw-r--r--m4/curl-openssl.m42
4 files changed, 188 insertions, 34 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index adafaa61d..c0f18c897 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 57
+# serial 58
dnl CURL_CHECK_COMPILER
@@ -423,35 +423,39 @@ dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
- tmp_has_include="no"
- tmp_chg_FLAGS="$CFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
- CFLAGS="$tmp_chg_FLAGS"
- squeeze CFLAGS
- fi
- tmp_has_include="no"
- tmp_chg_FLAGS="$CPPFLAGS"
- for word1 in $tmp_chg_FLAGS; do
- case "$word1" in
- -I*)
- tmp_has_include="yes"
- ;;
- esac
- done
- if test "$tmp_has_include" = "yes"; then
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
- tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
- CPPFLAGS="$tmp_chg_FLAGS"
- squeeze CPPFLAGS
+ AC_REQUIRE([CURL_CHECK_COMPILER])dnl
+ if test "$compiler_id" = "GNU_C" ||
+ test "$compiler_id" = "CLANG"; then
+ tmp_has_include="no"
+ tmp_chg_FLAGS="$CFLAGS"
+ for word1 in $tmp_chg_FLAGS; do
+ case "$word1" in
+ -I*)
+ tmp_has_include="yes"
+ ;;
+ esac
+ done
+ if test "$tmp_has_include" = "yes"; then
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+ CFLAGS="$tmp_chg_FLAGS"
+ squeeze CFLAGS
+ fi
+ tmp_has_include="no"
+ tmp_chg_FLAGS="$CPPFLAGS"
+ for word1 in $tmp_chg_FLAGS; do
+ case "$word1" in
+ -I*)
+ tmp_has_include="yes"
+ ;;
+ esac
+ done
+ if test "$tmp_has_include" = "yes"; then
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/^-I/ -isystem /g'`
+ tmp_chg_FLAGS=`echo "$tmp_chg_FLAGS" | "$SED" 's/ -I/ -isystem /g'`
+ CPPFLAGS="$tmp_chg_FLAGS"
+ squeeze CPPFLAGS
+ fi
fi
])
diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4
index 30fb025fd..9d4315626 100644
--- a/m4/curl-confopts.m4
+++ b/m4/curl-confopts.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 14
+# serial 16
dnl CURL_CHECK_OPTION_THREADED_RESOLVER
dnl -------------------------------------------------
@@ -496,3 +496,64 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
fi
])
+
+dnl CURL_CHECK_OPTION_NTLM_WB
+dnl -------------------------------------------------
+dnl Verify if configure has been invoked with option
+dnl --enable-ntlm-wb or --disable-ntlm-wb, and set
+dnl shell variable want_ntlm_wb and want_ntlm_wb_file
+dnl as appropriate.
+
+AC_DEFUN([CURL_CHECK_OPTION_NTLM_WB], [
+ AC_BEFORE([$0],[CURL_CHECK_NTLM_WB])dnl
+ OPT_NTLM_WB="default"
+ AC_ARG_ENABLE(ntlm-wb,
+AC_HELP_STRING([--enable-ntlm-wb@<:@=FILE@:>@],[Enable NTLM delegation to winbind's ntlm_auth helper, where FILE is ntlm_auth's absolute filename (default: /usr/bin/ntlm_auth)])
+AC_HELP_STRING([--disable-ntlm-wb],[Disable NTLM delegation to winbind's ntlm_auth helper]),
+ OPT_NTLM_WB=$enableval)
+ want_ntlm_wb_file="/usr/bin/ntlm_auth"
+ case "$OPT_NTLM_WB" in
+ no)
+ dnl --disable-ntlm-wb option used
+ want_ntlm_wb="no"
+ ;;
+ default)
+ dnl configure option not specified
+ want_ntlm_wb="yes"
+ ;;
+ *)
+ dnl --enable-ntlm-wb option used
+ want_ntlm_wb="yes"
+ if test -n "$enableval" && test "$enableval" != "yes"; then
+ want_ntlm_wb_file="$enableval"
+ fi
+ ;;
+ esac
+])
+
+
+dnl CURL_CHECK_NTLM_WB
+dnl -------------------------------------------------
+dnl Check if support for NTLM delegation to winbind's
+dnl ntlm_auth helper will finally be enabled depending
+dnl on given configure options and target platform.
+
+AC_DEFUN([CURL_CHECK_NTLM_WB], [
+ AC_REQUIRE([CURL_CHECK_OPTION_NTLM_WB])dnl
+ AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
+ AC_MSG_CHECKING([whether to enable NTLM delegation to winbind's helper])
+ if test "$ac_cv_native_windows" = "yes" ||
+ test "x$SSL_ENABLED" = "x"; then
+ want_ntlm_wb_file=""
+ want_ntlm_wb="no"
+ fi
+ AC_MSG_RESULT([$want_ntlm_wb])
+ if test "$want_ntlm_wb" = "yes"; then
+ AC_DEFINE(NTLM_WB_ENABLED, 1,
+ [Define to enable NTLM delegation to winbind's ntlm_auth helper.])
+ AC_DEFINE_UNQUOTED(NTLM_WB_FILE, "$want_ntlm_wb_file",
+ [Define absolute filename for winbind's ntlm_auth helper.])
+ NTLM_WB_ENABLED=1
+ fi
+])
+
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index ec57b5423..419571a26 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 65
+# serial 68
dnl CURL_INCLUDES_ARPA_INET
@@ -5624,6 +5624,95 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [
])
+dnl CURL_CHECK_FUNC_SOCKETPAIR
+dnl -------------------------------------------------
+dnl Verify if socketpair is available, prototyped, and
+dnl can be compiled. If all of these are true, and
+dnl usage has not been previously disallowed with
+dnl shell variable curl_disallow_socketpair, then
+dnl HAVE_SOCKETPAIR will be defined.
+
+AC_DEFUN([CURL_CHECK_FUNC_SOCKETPAIR], [
+ AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
+ AC_REQUIRE([CURL_INCLUDES_SOCKET])dnl
+ #
+ tst_links_socketpair="unknown"
+ tst_proto_socketpair="unknown"
+ tst_compi_socketpair="unknown"
+ tst_allow_socketpair="unknown"
+ #
+ AC_MSG_CHECKING([if socketpair can be linked])
+ AC_LINK_IFELSE([
+ AC_LANG_FUNC_LINK_TRY([socketpair])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_links_socketpair="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_links_socketpair="no"
+ ])
+ #
+ if test "$tst_links_socketpair" = "yes"; then
+ AC_MSG_CHECKING([if socketpair is prototyped])
+ AC_EGREP_CPP([socketpair],[
+ $curl_includes_sys_socket
+ $curl_includes_socket
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_proto_socketpair="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_proto_socketpair="no"
+ ])
+ fi
+ #
+ if test "$tst_proto_socketpair" = "yes"; then
+ AC_MSG_CHECKING([if socketpair is compilable])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+ $curl_includes_sys_socket
+ $curl_includes_socket
+ ]],[[
+ int sv[2];
+ if(0 != socketpair(0, 0, 0, sv))
+ return 1;
+ ]])
+ ],[
+ AC_MSG_RESULT([yes])
+ tst_compi_socketpair="yes"
+ ],[
+ AC_MSG_RESULT([no])
+ tst_compi_socketpair="no"
+ ])
+ fi
+ #
+ if test "$tst_compi_socketpair" = "yes"; then
+ AC_MSG_CHECKING([if socketpair usage allowed])
+ if test "x$curl_disallow_socketpair" != "xyes"; then
+ AC_MSG_RESULT([yes])
+ tst_allow_socketpair="yes"
+ else
+ AC_MSG_RESULT([no])
+ tst_allow_socketpair="no"
+ fi
+ fi
+ #
+ AC_MSG_CHECKING([if socketpair might be used])
+ if test "$tst_links_socketpair" = "yes" &&
+ test "$tst_proto_socketpair" = "yes" &&
+ test "$tst_compi_socketpair" = "yes" &&
+ test "$tst_allow_socketpair" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED(HAVE_SOCKETPAIR, 1,
+ [Define to 1 if you have the socketpair function.])
+ ac_cv_func_socketpair="yes"
+ else
+ AC_MSG_RESULT([no])
+ ac_cv_func_socketpair="no"
+ fi
+])
+
+
dnl CURL_CHECK_FUNC_STRCASECMP
dnl -------------------------------------------------
dnl Verify if strcasecmp is available, prototyped, and
diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4
index 9adc80fd5..cd9074b02 100644
--- a/m4/curl-openssl.m4
+++ b/m4/curl-openssl.m4
@@ -55,7 +55,7 @@ AC_DEFUN([CURL_CHECK_OPENSSL_API_HEADERS], [
tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
tst_api=0x$tst_vermaj$tst_vermin$tst_verfix
;;
- x11)
+ x11|x10)
tst_vermaj=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 3`
tst_vermin=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 5`
tst_verfix=`echo $curl_cv_def_OPENSSL_VERSION_NUMBER | cut -c 7`