summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2019-03-08 00:06:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2019-03-15 10:22:42 +0100
commit1e853653d2022bec831af62ec55765e6df62e356 (patch)
tree4aa6c5692f27358bd4516ddbfc21a385643c89c4 /acinclude.m4
parent76a9d8df0e03d2e0a648d882a62e08c90f994f88 (diff)
downloadcurl-1e853653d2022bec831af62ec55765e6df62e356.tar.gz
configure: add --with-amissl
AmiSSL is an Amiga native library which provides a wrapper over OpenSSL. It also requires all programs using it to use bsdsocket.library directly, rather than accessing socket functions through clib, which libcurl was not necessarily doing previously. Configure will now check for the headers and ensure they are included if found. Closes #3677
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m440
1 files changed, 39 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 41909dec7..24dad3914 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1031,6 +1031,10 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
#endif
#endif
#else
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -1076,6 +1080,10 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
#endif
#define RECVCALLCONV PASCAL
#else
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -1084,8 +1092,10 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [
#endif
#define RECVCALLCONV
#endif
+#ifndef HAVE_PROTO_BSDSOCKET_H
extern $recv_retv RECVCALLCONV
recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4);
+#endif
]],[[
$recv_arg1 s=0;
$recv_arg2 buf=0;
@@ -1165,6 +1175,10 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
#endif
#endif
#else
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -1210,6 +1224,10 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
#endif
#define SENDCALLCONV PASCAL
#else
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -1218,8 +1236,10 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [
#endif
#define SENDCALLCONV
#endif
+#ifndef HAVE_PROTO_BSDSOCKET_H
extern $send_retv SENDCALLCONV
send($send_arg1, $send_arg2, $send_arg3, $send_arg4);
+#endif
]],[[
$send_arg1 s=0;
$send_arg3 len=0;
@@ -1321,6 +1341,10 @@ AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [
#endif
#endif
#else
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -1714,6 +1738,7 @@ dnl using current libraries or if another one is required.
AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
+ AC_REQUIRE([CURL_INCLUDES_BSDSOCKET])dnl
AC_MSG_CHECKING([for connect in libraries])
tst_connect_save_LIBS="$LIBS"
tst_connect_need_LIBS="unknown"
@@ -1723,7 +1748,8 @@ AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_winsock2
- #ifndef HAVE_WINDOWS_H
+ $curl_includes_bsdsocket
+ #if !defined(HAVE_WINDOWS_H) && !defined(HAVE_PROTO_BSDSOCKET_H)
int connect(int, void*, int);
#endif
]],[[
@@ -1854,6 +1880,11 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
#endif
#endif
#ifndef HAVE_WINDOWS_H
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
@@ -1912,6 +1943,11 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
#endif
#endif
#ifndef HAVE_WINDOWS_H
+#ifdef HAVE_PROTO_BSDSOCKET_H
+#include <proto/bsdsocket.h>
+struct Library *SocketBase = NULL;
+#define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
@@ -1926,12 +1962,14 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
long tv_usec;
};
#endif
+#ifndef HAVE_PROTO_BSDSOCKET_H
extern $sel_retv SELECTCALLCONV
select($sel_arg1,
$sel_arg234,
$sel_arg234,
$sel_arg234,
$sel_arg5);
+#endif
]],[[
$sel_arg1 nfds=0;
$sel_arg234 rfds=0;