configure.ac 2.13 KB
Newer Older
David Herrmann's avatar
David Herrmann committed
1 2
AC_PREREQ([2.64])
AC_INIT([libgudev],
Bastien Nocera's avatar
233  
Bastien Nocera committed
3
        [233],
4
        [http://bugzilla.gnome.org/enter_bug.cgi?product=libgudev],
David Herrmann's avatar
David Herrmann committed
5
        [libgudev],
6
        [http://wiki.gnome.org/Projects/libgudev])
David Herrmann's avatar
David Herrmann committed
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
AC_CONFIG_SRCDIR([gudev/gudev.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])

AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AM_MAINTAINER_MODE([enable])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
AM_SILENT_RULES([yes])
AC_CANONICAL_HOST
LT_PREREQ([2.2])
LT_INIT([disable-static])

AC_PROG_MKDIR_P
AC_PROG_LN_S
AC_PROG_SED
AC_PROG_GREP
AC_PROG_AWK
AC_PROG_CC_C99
PKG_PROG_PKG_CONFIG

# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
         [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
          enable_gtk_doc=no])

m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
GOBJECT_INTROSPECTION_CHECK([1.31.1])
], [
   AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
   enable_introspection=no])

41
PKG_CHECK_MODULES([LIBUDEV], [libudev >= 199])
42
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.38 gobject-2.0 gio-2.0])
David Herrmann's avatar
David Herrmann committed
43

Bastien Nocera's avatar
Bastien Nocera committed
44 45 46 47 48 49 50 51 52
AC_ARG_ENABLE([umockdev],
	      AS_HELP_STRING([--disable-umockdev], [disable umockdev tests (default: enabled)]),,
	      [enable_umockdev=yes])
if test x"$enable_umockdev" != x"no" ; then
	PKG_CHECK_MODULES([UMOCKDEV], umockdev-1.0)
fi

AM_CONDITIONAL(HAVE_UMOCKDEV, [test x"$enable_umockdev" = x"yes"])

David Herrmann's avatar
David Herrmann committed
53 54 55
AC_CONFIG_FILES([
        Makefile
        gudev-1.0.pc
Bastien Nocera's avatar
Bastien Nocera committed
56
        tests/Makefile
David Herrmann's avatar
David Herrmann committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
        docs/Makefile
        docs/version.xml
])

AC_OUTPUT
AC_MSG_RESULT([
        $PACKAGE_NAME $VERSION
        gintrospection:          ${enable_introspection}
        gtk-doc:                 ${enable_gtk_doc}

        prefix:                  ${prefix}
        exec_prefix:             ${exec_prefix}
        includedir:              ${includedir}
        libdir:                  ${libdir}

        CFLAGS:                  ${CFLAGS}
        CPPFLAGS:                ${CPPFLAGS}
        LDFLAGS:                 ${LDFLAGS}
Bastien Nocera's avatar
Bastien Nocera committed
75 76

        umockdev (tests):        ${enable_umockdev}
David Herrmann's avatar
David Herrmann committed
77
])