From 0611badf297999cd6d4a9d0009bab84b8dce96f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20T=2E=20Colombini=20G=C3=B3mez?= Date: Thu, 19 Dec 2013 15:47:57 +0100 Subject: [PATCH] =?UTF-8?q?Ahora=20se=20puede=20compilar=20y=20ejecutar=20?= =?UTF-8?q?con=20la=20librer=C3=ADa=20hedera=20desinstalada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configure.ac | 46 +++++++++++++++++++++++++++++++++++++--------- data/users.glade | 38 +++++--------------------------------- src/Makefile.am | 6 ++---- 3 files changed, 44 insertions(+), 46 deletions(-) diff --git a/configure.ac b/configure.ac index 242a22f..aea1f7f 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,6 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) AM_GLIB_GNU_GETTEXT AM_XGETTEXT_OPTION([-k_ -kQ_:1g -kN_ -kC_:1c,2 -kNC_:1c,2]) -dnl Check for debug mode. AC_MSG_CHECKING([whether to build with debug information...]) AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], @@ -43,11 +42,10 @@ else VALAFLAGS= fi -dnl Check if the C warnings must be shown AC_MSG_CHECKING([whether C warnings will be shown...]) AC_ARG_ENABLE([c-warnings], [AS_HELP_STRING([--enable-c-warnings], - [Enable C warnings to be shown (def=no)])], + [Enable C warnings to be shown [default = no]])], [C_WARNINGS="$enableval"], [C_WARNINGS=no]) AC_MSG_RESULT([$C_WARNINGS]) @@ -63,13 +61,43 @@ AC_SUBST([VALAFLAGS]) LT_INIT -PKG_CHECK_VAR([account_libdir], [hedera], [modulelibdir]) -PKG_CHECK_VAR([account_datadir], [hedera], [moduledatadir]) -PKG_CHECK_VAR([querydir], [hedera], [modulequerydir]) +AC_ARG_VAR([UNINSTALLED_DIR], [the directory of the uninstalled hedera project]) +dnl This requires the user to specify the UNINSTALLED_DIR variable, with the +dnl path to the directory of the unsinstalled hedera project. +AC_MSG_CHECKING([use uninstalled Hedera]) +AC_ARG_ENABLE([uninstalled], + [AS_HELP_STRING([--enable-uninstalled], + [Enable the use of uninstalled Hedera located in the UNINSTALLED_DIR + directory, which must be defined [default = no]])], + [UNINSTALLED="$enableval"], + [UNINSTALLED=no]) +AC_MSG_RESULT([$UNINSTALLED]) -PKG_CHECK_MODULES(ACCOUNT, [hedera ]) -# Check if vala bindigns are installed and usable -VALA_CHECK_PACKAGES([hedera ]) +PKG_PROG_PKG_CONFIG + +if test x"$UNINSTALLED" = x"yes"; then + PKG_CHECK_MODULES(ACCOUNT, [gtk+-3.0]) + ACCOUNT_CFLAGS+=-I$UNINSTALLED_DIR + ACCOUNT_LIBS+=$UNINSTALLED_DIR/build/main/libhedera.la + + VALA_CHECK_PACKAGES([gtk+-3.0]) + VALAFLAGS+='--pkg gtk+-3.0 \ + --pkg gvn --pkg sql --pkg db --pkg vn \ + --vapidir $(UNINSTALLED_DIR)/build/vapi ' + + AC_SUBST(account_libdir, $libdir/hedera/module) + AC_SUBST(account_datadir,$datadir/hedera/module) + AC_SUBST(querydir,$account_datadir/sql) +else + PKG_CHECK_MODULES(ACCOUNT, [hedera]) + + VALA_CHECK_PACKAGES([hedera ]) + VALAFLAGS+='--pkg hedera ' + + PKG_CHECK_VAR([account_libdir], [hedera], [modulelibdir]) + PKG_CHECK_VAR([account_datadir], [hedera], [moduledatadir]) + PKG_CHECK_VAR([querydir], [hedera], [modulequerydir]) +fi AC_OUTPUT([ Makefile diff --git a/data/users.glade b/data/users.glade index e381212..6dea5ac 100644 --- a/data/users.glade +++ b/data/users.glade @@ -1,7 +1,7 @@ - + @@ -252,7 +252,7 @@ True True True - + 1 @@ -525,7 +525,7 @@ False 15 vertical - 20 + 58 True @@ -577,20 +577,6 @@ 1 - - - True - False - 1 - Call group: - - - 0 - 3 - 1 - 1 - - 170 @@ -634,20 +620,6 @@ 1 - - - True - False - sip - callgroup - - - 1 - 3 - 1 - 1 - - False @@ -704,7 +676,7 @@ FROM `user` u - SELECT user_id, extension, secret, callerid, callgroup + SELECT user_id, extension, secret, callerid FROM account_sip WHERE #p @@ -751,7 +723,7 @@ WHERE #p True dialog - + False diff --git a/src/Makefile.am b/src/Makefile.am index db5d1c9..24f5c4d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,12 +21,10 @@ libaccount_la_CPPFLAGS = \ $(ACCOUNT_CFLAGS) libaccount_la_CFLAGS = $(CFLAGS) +libaccount_la_VALAFLAGS = $(VALAFLAGS) #account_querydir = $(querydir)/account -#account_query_DATA = $(top_srcdir)/sql/account/queries.sql - -libaccount_la_VALAFLAGS = --pkg hedera \ - $(VALAFLAGS) +#account_query_DATA = $(top_srcdir)/sql/account/queries.sql uninstall-local: rm -f $(DESTDIR)$(libdir)/hedera/module/libaccount.so