nm: Automatically determine path to the auth dialog
authorLubomir Rintel <lkundrak@v3.sk>
Sat, 23 Apr 2016 08:51:43 +0000 (10:51 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 5 Sep 2016 13:28:54 +0000 (15:28 +0200)
src/frontends/gnome/Makefile.am
src/frontends/gnome/auth-dialog/Makefile.am
src/frontends/gnome/configure.ac
src/frontends/gnome/nm-strongswan-service.name.in

index a101995..2fc793e 100644 (file)
@@ -14,7 +14,7 @@ appdata_in_files = NetworkManager-strongswan.appdata.xml.in
 
 nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in
        $(AM_V_GEN) \
-       sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|' \
+       sed -e 's|[@]NM_LIBEXECDIR[@]|$(nm_libexecdir)|' \
            -e 's|[@]CHARON[@]|$(charon)|' $< >$@
 
 EXTRA_DIST = \
index c91c624..9e30652 100644 (file)
@@ -1,4 +1,4 @@
-libexec_PROGRAMS = nm-strongswan-auth-dialog
+nm_libexec_PROGRAMS = nm-strongswan-auth-dialog
 
 nm_strongswan_auth_dialog_CPPFLAGS = \
        $(GTHREAD_CFLAGS) \
index 047772d..13c3579 100644 (file)
@@ -14,6 +14,7 @@ AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
 
 dnl
 dnl Required headers
@@ -75,6 +76,8 @@ AC_ARG_WITH(
        [AC_SUBST(charon, "$withval")],
        [AC_SUBST(charon, "${libexecdir}/ipsec/charon-nm")]
 )
+nm_libexecdir=$($PKG_CONFIG --variable=libgnome_serverdir NetworkManager)
+AC_SUBST(nm_libexecdir)
 
 NM_COMPILER_WARNINGS
 
index 4120e55..ccba0b7 100644 (file)
@@ -4,5 +4,5 @@ service=org.freedesktop.NetworkManager.strongswan
 program=@CHARON@
 
 [GNOME]
-auth-dialog=@LIBEXECDIR@/nm-strongswan-auth-dialog
+auth-dialog=@NM_LIBEXECDIR@/nm-strongswan-auth-dialog
 properties=libnm-strongswan-properties