forked from SWI-Prolog/packages-ssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
49 lines (37 loc) · 932 Bytes
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
dnl Process this file with autoconf to produce a configure script.
AC_INIT(install-sh)
AC_PREREQ([2.50])
AC_CONFIG_HEADER(config.h)
AC_SUBST(TARGETS)
AC_SUBST(PLTARGETS)
m4_include([../ac_swi_c.m4])
AC_CHECK_LIB(ssl, SSL_library_init)
AC_CHECK_LIB(crypto, main)
AC_CHECK_TYPES(socklen_t, [], [],
[
#include <sys/types.h>
#include <sys/socket.h>
])
if test "$ac_cv_lib_ssl_SSL_library_init" = yes &&
test "$ac_cv_lib_crypto_main" = yes; then
TARGETS="ssl4pl.$SO"
else
echo "ERROR: Cannot find ssl library"
echo "WARNING: SSL interface will not be built"
TARGETS=""
fi
AC_MSG_CHECKING(h_errno)
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
],
[ int x = h_errno;
], AC_DEFINE(HAVE_H_ERRNO, 1,
[Define of h_errno is provided])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
PLTARGETS=`echo $TARGETS | sed "s/4pl\.$SO/.pl/g"`
AC_OUTPUT(Makefile)