configure.ac 1.23 KB
Newer Older
Daniel Drake's avatar
Daniel Drake committed
1
2
3
AC_INIT([fprintd], [0.1])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/main.c])
Bastien Nocera's avatar
Bastien Nocera committed
4
AC_CONFIG_HEADERS([config.h])
Daniel Drake's avatar
Daniel Drake committed
5
6
7
8
9

AC_PREREQ([2.50])
AC_PROG_CC
AM_PROG_CC_C_O

Bastien Nocera's avatar
Bastien Nocera committed
10
11
12
13
14
GETTEXT_PACKAGE=fprintd
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT

Daniel Drake's avatar
Daniel Drake committed
15
PKG_CHECK_MODULES(FPRINT, [libfprint > 0.1.0])
Daniel Drake's avatar
Daniel Drake committed
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
AC_SUBST(FPRINT_LIBS)
AC_SUBST(FPRINT_CFLAGS)

PKG_CHECK_MODULES(GLIB, "glib-2.0")
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(DBUS_GLIB, "dbus-glib-1")
AC_SUBST(DBUS_GLIB_LIBS)
AC_SUBST(DBUS_GLIB_CFLAGS)

AS_AC_EXPAND(DATADIR, $datadir)

DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])

# Restore gnu89 inline semantics on gcc 4.3 and newer
saved_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fgnu89-inline"
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), inline_cflags="-fgnu89-inline", inline_cflags="")
CFLAGS="$saved_cflags"

AM_CFLAGS="-std=gnu99 $inline_cflags -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
AC_SUBST(AM_CFLAGS)

Bastien Nocera's avatar
Bastien Nocera committed
42
AC_CONFIG_FILES([Makefile] [src/Makefile] [data/Makefile] [tests/Makefile])
Daniel Drake's avatar
Daniel Drake committed
43
44
AC_OUTPUT