summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-08-05 20:34:43 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-08-05 20:34:43 +0000
commit0eb2ee14350308042eae163af35e795d6a67f8d3 (patch)
tree1fd4fa815d3fcbdb961d2360a9216771c22c7ce7 /configure.ac
parent96f77a2e64d79e4fbc47a5844ef2403d71012e5a (diff)
downloadopenvpn-0eb2ee14350308042eae163af35e795d6a67f8d3.tar.gz
openvpn-0eb2ee14350308042eae163af35e795d6a67f8d3.tar.xz
openvpn-0eb2ee14350308042eae163af35e795d6a67f8d3.zip
Reverted r3181, accomplish the same thing via a special case
for Windows stdcall functions in configure.ac (Alon Bar-Lev). Minor fix to cryptoapi.c to not compile itself unless USE_CRYPTO and USE_SSL flags are enabled (Alon Bar-Lev). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3183 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 15 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index da53407..bd256b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -458,17 +458,25 @@ AC_CHECK_SIZEOF(unsigned long)
AC_CACHE_SAVE
+AC_CHECK_FUNCS([ctime memset vsnprintf strdup], ,
+ [AC_MSG_ERROR([Required library function not found])])
AC_CHECK_FUNCS(daemon chroot getpwnam setuid nice system getpid dup dup2 dnl
getpass strerror syslog openlog mlockall getgrnam setgid dnl
- setgroups stat flock readv writev setsockopt getsockopt dnl
+ setgroups stat flock readv writev time dnl
setsid chdir putenv getpeername unlink dnl
- poll chsize ftruncate sendmsg recvmsg getsockname dnl
- execve)
-AC_CACHE_SAVE
+ chsize ftruncate execve)
+
+# Windows use stdcall for winsock so we cannot auto detect these
+m4_define([SOCKET_FUNCS], [socket recv recvfrom send sendto listen dnl
+ accept connect bind select gethostbyname inet_ntoa])
+m4_define([SOCKET_OPT_FUNCS], [setsockopt getsockopt getsockname poll])
if test "${WIN32}" = "yes"; then
AC_DEFINE([HAVE_GETTIMEOFDAY], [1], [We fake gettimeofday for win32 at otime.c])
+ m4_foreach([F], m4_split(SOCKET_FUNCS SOCKET_OPT_FUNCS),
+ m4_define(UF, [[m4_join([_], [HAVE], m4_toupper(F))]])
+ AC_DEFINE([UF], [1], [Win32 builtin]))
else
@@ -489,10 +497,9 @@ else
AC_CHECK_FUNCS(gettimeofday)
- AC_CHECK_FUNCS(socket recv recvfrom send sendto listen dnl
- accept connect bind select gethostbyname dnl
- inet_ntoa time ctime memset vsnprintf strdup, [],
- [AC_MSG_ERROR([Required library function not found])])
+ AC_CHECK_FUNCS(SOCKET_FUNCS, ,
+ [AC_MSG_ERROR([Required library function not found])])
+ AC_CHECK_FUNCS(SOCKET_OPT_FUNCS sendmsg recvmsg)
fi