-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
68 lines (59 loc) · 1.48 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
AC_INIT(mod_suid, 2.1, [email protected])
AC_CONFIG_SRCDIR(mod_suid.c)
AC_PROG_CC
AC_CONFIG_HEADER(config.h)
AC_MSG_CHECKING([for a working apxs binary])
AC_ARG_WITH(apxs,
[ --with-apxs[=FILE] Build shared apache module. FILE is the
optional pathname to the apache apxs tool;
defaults to "apxs".],
[
if test "$withval" = "yes"; then
APXS=apxs
else
APXS="$withval"
fi
],
[
APXS=apxs
])
if test -n "$APXS"; then
BINNAME=mod_suid.so
APXS_CC="`$APXS -q CC`"
APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
APXS_LIBEXEC="`$APXS -q LIBEXECDIR`"
INCLUDE="$INCLUDE -I$APXS_INCLUDE"
INSTALL_IT="mkdir -p \$(INSTALL_ROOT)$APXS_LIBEXEC && \
\$(APXS) -S LIBEXECDIR=\$(INSTALL_ROOT)$APXS_LIBEXEC -i -n suid $BINNAME"
AC_SUBST(APXS)
AC_SUBST(BINNAME)
AC_SUBST(INSTALL_IT)
AC_SUBST(APXS_INCLUDE)
AC_SUBST(APXS_LIBEXEC)
AC_MSG_RESULT(found at $APXS)
else
AC_MSG_RESULT(no)
fi
if test -n "$APXS"; then
if test -z "`$APXS -q LD_SHLIB`" || test "$APXS_LIBEXEC" = "modules"; then
AC_MSG_ERROR(
[ Your APXS installation is broken and cannot be used.])
fi
fi
AC_CHECK_FUNC(setresuid,
[
AC_DEFINE(HAVE_SETRESUID, 1, [ Define to 1 if you have the `setresuid' function ])
],
[
AC_MSG_ERROR(You need an OS with has the setresuid system call)
]
)
AC_CHECK_FUNC(setresgid,
[
AC_DEFINE(HAVE_SETRESGID, 1, [ Define to 1 if you have the `setresgid' function ])
],
[
AC_MSG_ERROR(You need an OS with has the setresgid system call)
]
)
AC_OUTPUT(Makefile)