Revert "Imported Upstream version 7.44.0"
[platform/upstream/curl.git] / acinclude.m4
index 782f32d..453358d 100644 (file)
@@ -1851,10 +1851,8 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
   AC_REQUIRE([AC_HEADER_TIME])dnl
   AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
   AC_MSG_CHECKING([for monotonic clock_gettime])
-  #
-  if test "x$dontwant_rt" == "xno" ; then
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
+  AC_COMPILE_IFELSE([
+    AC_LANG_PROGRAM([[
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -1868,18 +1866,17 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
 #include <time.h>
 #endif
 #endif
-      ]],[[
-        struct timespec ts;
-        (void)clock_gettime(CLOCK_MONOTONIC, &ts);
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      ac_cv_func_clock_gettime="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      ac_cv_func_clock_gettime="no"
-    ])
-  fi
+    ]],[[
+      struct timespec ts;
+      (void)clock_gettime(CLOCK_MONOTONIC, &ts);
+    ]])
+  ],[
+    AC_MSG_RESULT([yes])
+    ac_cv_func_clock_gettime="yes"
+  ],[
+    AC_MSG_RESULT([no])
+    ac_cv_func_clock_gettime="no"
+  ])
   dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally postponed
   dnl until library linking and run-time checks for clock_gettime succeed.
 ])
@@ -2455,6 +2452,23 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
 ])
 
 
+# This is only a temporary fix. This macro is here to replace the broken one
+# delivered by the automake project (including the 1.9.6 release). As soon as
+# they ship a working version we SHOULD remove this work-around.
+
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} \"$am_aux_dir/missing\""
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+
 dnl CURL_VERIFY_RUNTIMELIBS
 dnl -------------------------------------------------
 dnl Verify that the shared libs found so far can be used when running
@@ -2593,16 +2607,15 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
   if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
           "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
     dnl both given
-    ca="$want_ca"
-    capath="$want_capath"
+    AC_MSG_ERROR([Can't specify both --with-ca-bundle and --with-ca-path.])
   elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then
     dnl --with-ca-bundle given
     ca="$want_ca"
     capath="no"
   elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
     dnl --with-ca-path given
-    if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
-      AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL])
+    if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
+      AC_MSG_ERROR([--with-ca-path only works with openSSL or PolarSSL])
     fi
     capath="$want_capath"
     ca="no"
@@ -2656,13 +2669,11 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
     AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [Location of default ca bundle])
     AC_SUBST(CURL_CA_BUNDLE)
     AC_MSG_RESULT([$ca])
-  fi
-  if test "x$capath" != "xno"; then
+  elif test "x$capath" != "xno"; then
     CURL_CA_PATH="\"$capath\""
     AC_DEFINE_UNQUOTED(CURL_CA_PATH, "$capath", [Location of default ca path])
     AC_MSG_RESULT([$capath (capath)])
-  fi
-  if test "x$ca" = "xno" && test "x$capath" = "xno"; then
+  else
     AC_MSG_RESULT([no])
   fi
 ])