/
configure.in
75 lines (59 loc) · 1.69 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
AC_INIT([unixdom_drv], [0.1-git])
dnl work out who the cpu, vendor and OS are
AC_CANONICAL_SYSTEM
AC_DEFINE_UNQUOTED(CPU_VENDOR_OS, "$target", CPU_VENDOR_OS)
JUNGERL_DIR=$(dirname `pwd`)
AC_SUBST(JUNGERL_DIR)
dnl Programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_PROG(ERL, erl, erl)
AC_PATH_PROG(ERLC, erlc, erlc)
ERLDIR=`awk -F= '/ROOTDIR=/ { print [$]2; exit; }' $ERL`
AC_SUBST(ERLDIR)
dnl C header files
AC_CONFIG_HEADER(../support/config.h:config.h.in)
AC_CHECK_HEADERS(malloc.h)
BT_MSG_CONTROL
case "$target_os" in
*cygwin*)
:
dnl fix this later
;;
linux*)
AC_DEFINE(LINUX,,LINUX)
LD_SHARED="\$(CC) -shared"
;;
*bsd*)
AC_DEFINE(BSD,,BSD)
LD_SHARED="ld -Bshareable"
;;
*solaris*)
AC_DEFINE(SOLARIS,,SOLARIS)
LD_SHARED="ld -G"
;;
*darwin*)
AC_DEFINE([DARWIN], [], [Description])
LD_SHARED="cc -bundle -flat_namespace -undefined suppress"
;;
*)
LD_SHARED="ld -shared"
;;
esac
AC_SUBST(LD_SHARED)
dnl # lieder@skyler.mavd.honeywell.com says without -lsocket,
dnl # socket/setsockopt and other routines are undefined under SCO ODT
dnl # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
dnl # on later versions), says simon@lia.di.epfl.ch: it contains
dnl # gethostby* variants that don't use the nameserver (or something).
dnl # -lsocket must be given before -lnsl if both are needed.
dnl # We assume that if connect needs -lnsl, so does gethostbyname.
AC_CHECK_FUNC(connect, ,
[AC_CHECK_LIB(socket, connect, SOCKET_LIBS="-lsocket",
[AC_MSG_ERROR(Function 'socket' not found.)], $NSL_LIBS)])
AC_SUBST(SOCKET_LIBS)
dnl
dnl End.
AC_CONFIG_FILES([../support/include.mk ../bin/jerl])
AC_OUTPUT