-
Notifications
You must be signed in to change notification settings - Fork 57
/
configure.in
113 lines (83 loc) · 2.35 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Copyright 2012-2024 Tail-f Systems AB
#
# See the file "LICENSE" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# Process this file with autoconf to produce a configure script.
AC_INIT(Makefile)
if test "x$prefix" = "xNONE"; then
PREFIX=/usr/local
else
PREFIX=$prefix
fi
AC_SUBST(PREFIX)
if test "x$exec_prefix" = "xNONE"; then
EXEC_PREFIX=DEFAULT
else
EXEC_PREFIX=$exec_prefix
fi
AC_SUBST(EXEC_PREFIX)
if test "x$bindir" = 'x${exec_prefix}/bin'; then
BINDIR=DEFAULT
else
BINDIR=$bindir
fi
AC_SUBST(BINDIR)
if test "x$sysconfdir" = 'x${prefix}/etc'; then
SYSCONFDIR=DEFAULT
else
SYSCONFDIR=$sysconfdir
fi
AC_SUBST(SYSCONFDIR)
################################################################################
# C
AC_ARG_ENABLE(runpty,
AS_HELP_STRING([--enable-runpty], [enable use of runpty shell wrapper])
AS_HELP_STRING([--disable-runpty], [disable use of runpty shell wrapper]))
if test "x$enable_runpty" != "xno"; then
# AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([c_src/runpty.c])
# AC_CONFIG_HEADERS([config.h])
# Checks for C programs.
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
CFLAGS="$CFLAGS -Wall"
AC_SUBST(CFLAGS)
# AC_PROG_MAKE_SET
# AC_PROG_INSTALL
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_FORK
AC_CHECK_FUNCS([dup2 select])
C_SRC_TARGET=c_src
else
C_SRC_TARGET=
fi
AC_SUBST(C_SRC_TARGET)
################################################################################
# Erlang
# AC_ERLANG_NEED_ERL is not available on old systems
AC_PATH_PROG(ERL, erl, no)
if test "x$ERL" = "xno"; then
AC_MSG_ERROR([erl: command not found])
fi
# AC_ERLANG_NEED_ERLC is not available on old systems
AC_PATH_PROG(ERLC, erlc, no)
if test "x$ERLC" = "xno"; then
AC_MSG_ERROR([erlc: command not found])
fi
################################################################################
# Doc
AC_PATH_PROG(MARKDOWN, markdown, no)
if test "x$MARKDOWN" = "xno"; then
# Enforce a runtime error when doc is built
MARKDOWN=markdown
fi
AC_SUBST(MARKDOWN)
################################################################################
# Output
AC_OUTPUT(include.mk)
AC_OUTPUT