summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac58
1 files changed, 56 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 5955656..dc61a27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,11 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_CONFIG_MACRO_DIR([m4])
-dnl prefix is /usr, exec_prefix in /, if overridden exec_prefix follows prefix
+# libgudev versioning
+LIBGUDEV_VERSION=001
+AC_SUBST(LIBGUDEV_VERSION)
+
+# prefix is /usr, exec_prefix in /, if overridden exec_prefix follows prefix
AC_PREFIX_DEFAULT([/usr])
test "$prefix" = NONE && test "$exec_prefix" = NONE && exec_prefix=
@@ -17,6 +21,7 @@ AC_ARG_WITH(udev-prefix,
udev_prefix=$with_udev_prefix
AC_SUBST(udev_prefix)
+AC_PROG_LIBTOOL
AC_PROG_AWK
AC_PATH_PROG([GPERF], [gperf])
if test -z "$GPERF"; then
@@ -32,10 +37,12 @@ PKG_CHECK_MODULES(LIBUDEV, libudev >= 141)
AC_SUBST(LIBUDEV_CFLAGS)
AC_SUBST(LIBUDEV_LIBS)
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.7.0)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
+GTK_DOC_CHECK([1.3])
+
PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12)
AC_SUBST(LIBUSB_CFLAGS)
AC_SUBST(LIBUSB_LIBS)
@@ -59,6 +66,45 @@ AC_ARG_WITH(pci-ids-path,
fi])
AC_SUBST(PCI_DATABASE)
+# *********************
+# GObject Introspection
+# *********************
+
+AC_MSG_CHECKING([whether to enable GObject introspection support])
+AC_ARG_ENABLE([introspection],
+ [AS_HELP_STRING([--enable-introspection],[Enable GObject introspection (default: disabled)])],
+ [],[enable_introspection=no])
+AC_MSG_RESULT([$enable_introspection])
+
+G_IR_SCANNER=
+G_IR_COMPILER=
+G_IR_GENERATE=
+GIRDIR=
+GIRTYPELIBDIR=
+
+if test "$enable_introspection" = "yes"; then
+ GOBJECT_INTROSPECTION_REQUIRED=0.6.2
+ PKG_CHECK_MODULES([INTROSPECTION],[gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED])
+
+ G_IR_SCANNER="$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)"
+ G_IR_COMPILER="$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)"
+ G_IR_GENERATE="$($PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0)"
+ GIRDIR="$($PKG_CONFIG --variable=girdir gobject-introspection-1.0)"
+ GIRTYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+
+ AC_DEFINE([ENABLE_INTROSPECTION],[1],[Define to enable GObject introspection support])
+fi
+
+AC_SUBST([G_IR_SCANNER])
+AC_SUBST([G_IR_COMPILER])
+AC_SUBST([G_IR_GENERATE])
+AC_SUBST([GIRDIR])
+AC_SUBST([GIRTYPELIBDIR])
+
+AM_CONDITIONAL([ENABLE_INTROSPECTION],[test "$enable_introspection" = "yes"])
+
+# ----------------------------------------------------------------------------------------------------
+
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([
Makefile
@@ -68,6 +114,10 @@ udev-acl/Makefile
keymap/Makefile
v4l_id/Makefile
usb-db/Makefile
+gudev/Makefile
+gudev/gudev-1.0.pc
+gudev/docs/version.xml
+gudev/docs/Makefile
])
AC_OUTPUT
@@ -80,6 +130,7 @@ AC_MSG_RESULT([
udev_prefix: ${udev_prefix}
datarootdir: ${datarootdir}
mandir: ${mandir}
+ libdir: ${libdir}
usb.ids: ${USB_DATABASE}
pci.ids: ${PCI_DATABASE}
@@ -88,6 +139,9 @@ AC_MSG_RESULT([
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
+ libgudev version: ${LIBGUDEV_VERSION}
+ GObject introspection: ${enable_introspection}
+
xsltproc: ${XSLTPROC}
gperf: ${GPERF}
])