File: configure.ac

package info (click to toggle)
svrcore 1%3A4.1.2%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,540 kB
  • ctags: 347
  • sloc: sh: 11,304; ansic: 1,617; makefile: 94
file content (68 lines) | stat: -rw-r--r-- 1,764 bytes parent folder | download
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(svrcore, 4.1.2, [wibrown@redhat.com, rmeggins@redhat.com], svrcore)
AM_INIT_AUTOMAKE([gnu check-news dist-bzip2])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/svrcore.h])
AC_CONFIG_HEADER([config.h])

AC_PROG_CC
AC_PROG_LIBTOOL

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADER([string.h],,[AC_ERROR([We need string.h in order to build])])
AC_CHECK_HEADER([termios.h],,[AC_ERROR([We need termios.h in order to build])])
AC_CHECK_HEADER([unistd.h],,[AC_ERROR([We need unistd.h in order to build])])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset strchr strdup])

# Check for library dependencies
m4_include(m4/nss.m4)
m4_include(m4/nspr.m4)
m4_include(m4/systemd.m4)

AC_MSG_CHECKING(for --enable-debug)
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debug features (default: no)]),
[
  AC_MSG_RESULT(yes)
  debug_defs="-g3 -DDEBUG"
],
[
  AC_MSG_RESULT(no)
  debug_defs=""
])
AC_SUBST([debug_defs])

AC_MSG_CHECKING(for --enable-asan)
AC_ARG_ENABLE(asan, AS_HELP_STRING([--enable-asan], [Enable gcc address sanitizer options (default: no)]),
[
  AC_MSG_RESULT(yes)
  asan_defs="-fsanitize=address -fno-omit-frame-pointer"
],
[
  AC_MSG_RESULT(no)
  asan_defs=""
])
AC_SUBST([asan_defs])

AC_SUBST([NSPR_CFLAGS])
AC_SUBST([NSPR_LIBS])
AC_SUBST([NSPR_MIN_VER])
AC_SUBST([NSPR_NAME])
AC_SUBST([NSS_CFLAGS])
AC_SUBST([NSS_LIBS])
AC_SUBST([NSS_MIN_VER])
AC_SUBST([NSS_NAME])
AC_SUBST([SYSTEMD_CFLAGS])
AC_SUBST([PACKAGE_VERSION])

AC_CONFIG_FILES([src/Makefile Makefile svrcore.pc])
AC_OUTPUT