Fix the configure script to allow oprofile-server to be built standalone (without needing GTK+ and other X-requiring libraries)
Signed-off-by: Paul Eggleton <[email protected]> --- configure.ac | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index d49952e..2a7010b 100644 --- a/configure.ac +++ b/configure.ac @@ -29,9 +29,11 @@ AC_ARG_ENABLE(client, AM_CONDITIONAL(ENABLE_SERVER, test x$enable_server = xyes) AM_CONDITIONAL(ENABLE_CLIENT, test x$enable_client = xyes) -PKG_CHECK_MODULES(OPROFILEUI, [glib-2.0 libglade-2.0 gtk+-2.0 libxml-2.0 gconf-2.0]) -AC_SUBST(OPROFILEUI_CFLAGS) -AC_SUBST(OPROFILEUI_LIBS) +AS_IF([test "x$enable_client" = "xyes"], [ + PKG_CHECK_MODULES(OPROFILEUI, [glib-2.0 libglade-2.0 gtk+-2.0 libxml-2.0 gconf-2.0]) + AC_SUBST(OPROFILEUI_CFLAGS) + AC_SUBST(OPROFILEUI_LIBS) +]) PKG_CHECK_MODULES(OPROFILE_SERVER, [glib-2.0]) AC_SUBST(OPROFILE_SERVER_CFLAGS) @@ -41,7 +43,12 @@ AC_ARG_WITH(avahi, [AC_HELP_STRING([--with-avahi], [Use Avahi to announce and search for OProfile servers])], with_avahi="$withval", with_avahi=no) if test $with_avahi = "yes"; then - PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib avahi-ui]) + AS_IF([test "x$enable_client" = "xyes"], [ + PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib avahi-ui]) + ],[ + PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib]) + ]) + AC_DEFINE_UNQUOTED(WITH_AVAHI, [1], [Using Avahi]) fi AM_CONDITIONAL(WITH_AVAHI, test x$with_avahi = xyes) -- 1.7.5.4 _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
