Skip to content

Commit

Permalink
Add build option to enable sailfish access control
Browse files Browse the repository at this point in the history
Add --enable-sailfish-access-control to configure.
Enable sailfish access control in %build.

Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
  • Loading branch information
Tomin1 committed Jan 15, 2020
1 parent 3142bf0 commit dd99200
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions configure.ac
Expand Up @@ -49,6 +49,14 @@ AC_ARG_ENABLE([mer_ssu], AS_HELP_STRING([--enable-mer-ssu], [Enable MER SSU @<:@
esac],[mer_ssu=false])
AM_CONDITIONAL([USE_MER_SSU], [test x$mer_ssu = xtrue])

AC_ARG_ENABLE([sailfish_access_control], AS_HELP_STRING([--enable-sailfish-access-control], [Enable Sailfish Access Control @<:@default=false@:>@]),
[case "${enableval}" in
yes) sailfish_access_control=true ; CFLAGS="-DSAILFISH_ACCESS_CONTROL $CFLAGS" ;;
no) sailfish_access_control=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-sailfish-access-control]) ;;
esac],[sailfish_access_control=false])
AM_CONDITIONAL([SAILFISH_ACCESS_CONTROL], [test x$sailfish_access_control = xtrue])

AC_ARG_ENABLE([app_sync], AS_HELP_STRING([--enable-app-sync], [Enable application syncing @<:@default=true@:>@]),
[case "${enableval}" in
yes) app_sync=true ; CFLAGS="-DAPP_SYNC $CFLAGS" ;;
Expand Down Expand Up @@ -100,6 +108,7 @@ PKG_CHECK_MODULES([USB_MODED], [
ssu-sysinfo
libsystemd
dsme
sailfishaccesscontrol
])

AC_SUBST(USB_MODED_LIBS)
Expand Down
3 changes: 2 additions & 1 deletion rpm/usb-moded.spec
Expand Up @@ -17,6 +17,7 @@ BuildRequires: doxygen
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(ssu-sysinfo)
BuildRequires: pkgconfig(dsme) >= 0.65.0
BuildRequires: pkgconfig(sailfishaccesscontrol)

Requires: lsof
Requires: usb-moded-configs
Expand Down Expand Up @@ -327,7 +328,7 @@ when the UI fails.

%build
test -e Makefile || (%autogen)
test -e Makefile || (%configure --enable-app-sync --enable-meegodevlock --enable-debug --enable-connman --enable-systemd --enable-mer-ssu)
test -e Makefile || (%configure --enable-app-sync --enable-meegodevlock --enable-debug --enable-connman --enable-systemd --enable-mer-ssu --enable-sailfish-access-control)
make all doc %{?_smp_mflags}

%install
Expand Down
5 changes: 5 additions & 0 deletions src/Makefile.am
Expand Up @@ -80,6 +80,11 @@ usb_moded_SOURCES += \
usb_moded-appsync-dbus-private.h
endif

if SAILFISH_ACCESS_CONTROL
usb_moded_CPPFLAGS += `pkg-config --cflags sailfishaccesscontrol`
usb_moded_LDFLAGS += `pkg-config --libs sailfishaccesscontrol`
endif

usb_moded_util_CPPFLAGS = \
$(USB_MODED_CFLAGS)

Expand Down

0 comments on commit dd99200

Please sign in to comment.