Commit 97be2694 authored by Philip Withnall's avatar Philip Withnall Committed by Zeeshan Ali

build: Find gdbus-codegen path from gio-2.0 pkg-config file

https://bugs.freedesktop.org/show_bug.cgi?id=67858
parent 5ce05ec0
......@@ -153,6 +153,20 @@ AC_ARG_WITH(dbus-service-user,
dbus_srv_user="root")
AC_SUBST(dbus_srv_user)
# gdbus-codegen
if test x$cross_compiling != xyes; then
GDBUS_CODEGEN=`$PKG_CONFIG --variable gdbus_codegen gio-2.0`
else
AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen])
fi
AC_SUBST([GDBUS_CODEGEN])
if test "x$GDBUS_CODEGEN" = "x"; then
ifelse([$2],,[AC_MSG_ERROR([gdbus-codegen not found.])],[$2])
else
ifelse([$1],,[:],[$1])
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
......
......@@ -14,7 +14,7 @@ interface_DATA = geoclue-interface.xml
dbus_built_sources = geoclue-interface.c geoclue-interface.h
geoclue-interface.c: geoclue-interface.h
geoclue-interface.h: Makefile.am $(interface_DATA)
gdbus-codegen \
$(AM_V_GEN)$(GDBUS_CODEGEN) \
--interface-prefix org.freedesktop.GeoClue2. \
--c-namespace GClue \
--generate-c-code geoclue-interface \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment