diff --git a/configure.ac b/configure.ac index cd34a82..8071bff 100644 --- a/configure.ac +++ b/configure.ac @@ -3,4 +3,27 @@ AM_INIT_AUTOMAKE(ke-recv-extra, 0.2) AM_CONFIG_HEADER(config.h) AC_PROG_CC +PKG_CHECK_MODULES(OSSO, libosso) +AC_SUBST(OSSO_CFLAGS) +AC_SUBST(OSSO_LIBS) + +PKG_CHECK_MODULES(GLIB, glib-2.0) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) + +PKG_CHECK_MODULES(GCONF, gconf-2.0) +AC_SUBST(GCONF_FLAGS) +AC_SUBST(GCONF_LIBS) + +PKG_CHECK_MODULES(DBUS, dbus-1) +AC_SUBST(DBUS_CFLAGS) +AC_SUBST(DBUS_LIBS) + +PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1) +AC_SUBST(DBUS_GLIB_CFLAGS) +AC_SUBST(DBUS_GLIB_LIBS) + +LOCALEDIR=`pkg-config --variable=localedir osso-af-settings` +AC_SUBST(LOCALEDIR) + AC_OUTPUT([Makefile src/Makefile]) diff --git a/src/Makefile.am b/src/Makefile.am index 8e4dee8..7a7e23b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,15 +1,9 @@ sbin_PROGRAMS = hulda -INCLUDES = \ - `pkg-config --cflags libosso` \ - `pkg-config --cflags glib-2.0` \ - `pkg-config --cflags gconf-2.0` \ - `pkg-config --cflags dbus-1` \ - `pkg-config --cflags dbus-glib-1` \ - -DLOCALEDIR=\"`pkg-config --variable=localedir osso-af-settings`\" +INCLUDES = -DLOCALEDIR=\"$(LOCALEDIR)\" -hulda_LDFLAGS = \ - `pkg-config --libs gconf-2.0 dbus-glib-1` +hulda_CFLAGS= $(GLIB_CFLAGS) $(GCONF_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_CFLAGS) $(OSSO_CFLAGS) +hulda_LDADD = $(GLIB_LIBS) $(GCONF_LIBS) $(DBUS_GLIB_LIBS) $(DBUS_LIBS) $(OSSO_LIBS) hulda_SOURCES = \ hulda.h \