configure.ac 846 Bytes
Newer Older
ale's avatar
ale committed
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
AC_PREREQ([2.69])
AC_INIT([suexec-sandbox], [0.1], [info@autistici.org])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_SRCDIR([suexec.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)
AC_LANG(C)

CFLAGS="$CFLAGS -Wall -Wextra -Werror -Wpedantic -std=c11"
AC_PROG_CC

AC_CHECK_LIB(cap, cap_get_proc, [], [AC_ERROR(libcap is missing)])

AC_CHECK_LIB(seccomp, seccomp_init, [], [AC_ERROR(libseccomp is mising)])

AC_SUBST(MODULEDIR, "/usr/lib/apache2")
AC_ARG_WITH(apache2-lib-dir,
  AC_HELP_STRING([--with-apache2-lib-dir=DIR],
                 [Where to install the suexec binary [[/usr/lib/apache2]]]),
          [case "${withval}" in
          /*) MODULEDIR="${withval}";;
          *)  AC_MSG_ERROR(Bad value for --with-apache2-lib-dir);;
          esac])
AC_MSG_NOTICE([Suexec installation path $MODULEDIR])

AC_OUTPUT(Makefile)