-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
47 lines (35 loc) · 1.02 KB
/
configure.ac
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
AC_INIT([checkdisks], [0.0.1], [@t-nelson on GitHub])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign])
# Work around stupid autoconf default cflags. pt 1
SAVE_CFLAGS="x${CFLAGS}"
AC_PROG_CC
AC_PROG_RANLIB
AM_PROG_CC_C_O
# Work around stupid autoconf default cflags. pt 2
if test "$SAVE_CFLAGS" = "x"; then
CFLAGS=""
fi
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--disable-debug],
[Disable debugging facilities])],
[use_debug=$enableval],
[use_debug=yes])
if test x$use_debug = xyes; then
DBG_CFLAGS="-g -Wall -Werror"
else
RLS_CFLAGS=-O2
RLS_CPPFLAGS=-DNDEBUG
fi
AC_CONFIG_FILES([Makefile]
[src/Makefile]
)
AM_CPPFLAGS=-D_GNU_SOURCE
AC_SUBST(DBG_CFLAGS)
AC_SUBST(RLS_CFLAGS)
AC_SUBST(RLS_CPPFLAGS)
AC_SUBST(AM_CPPFLAGS)
AC_CHECK_LIB([pci], [main],, AC_MSG_ERROR([Missing a required library!]))
AC_CHECK_LIB([m], [main],, AC_MSG_ERROR([Missing a required library!]))
PKG_CHECK_MODULES([DBUS], [dbus-1])
AC_OUTPUT