support explict enable and disable of ntrack bindings
Bug #654221 reported by
Alexander Sack
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ntrack |
Fix Released
|
Wishlist
|
Alexander Sack |
Bug Description
atm, ntrack bindings get automatically enabled/disabled if the needed build dependencies are available/
This is not the best approach for all cases; hence it was proposed in bug 653882 to add --with-<binding> options to configure.
Default behaviour will preserve current behaviour. --with-<binding> will force the build of the giving binding and will cause configure to fail if required prerequisites are not available.
Related branches
Changed in ntrack: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
milestone: | none → 009 |
description: | updated |
Changed in ntrack: | |
assignee: | nobody → Alexander Sack (asac) |
To post a comment you must log in.
------- ------- ------- ------- ------- ------- ------- ------- ---- /launchpad. net/bugs/ 654221 <binding> - see lp:654221
revno: 207
fixes bug(s): https:/
committer: Alexander Sack <email address hidden>
branch nick: ntrack
timestamp: Sun 2010-10-03 20:45:55 +0200
message:
add explicit ./configure flag for with/without-
diff:
=== modified file 'Makefile.am'
--- Makefile.am 2010-01-10 21:35:49 +0000
+++ Makefile.am 2010-10-03 18:45:55 +0000
@@ -21,12 +21,20 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = common glib qt4
+SUBDIRS = common
+
+if HAVE_GLIB2
+SUBDIRS += glib
+endif
if HAVE_GOBJECT
SUBDIRS += gobject
endif
+if HAVE_QT4
+SUBDIRS +=qt4
+endif
+
dist_doc_DATA = AUTHORS NEWS README
dump-bzr- changelog:
=== modified file 'configure.ac'
--- configure.ac 2010-07-27 22:47:22 +0000
+++ configure.ac 2010-10-03 18:45:55 +0000
@@ -36,33 +36,91 @@
dnl Checks for libraries.
-PKG_CHECK_ MODULES( GLIB, glib-2.0) GLIB_CFLAGS) GLIB_LIBS) MODULES( GOBJECT, gobject-2.0, ac_have_gobject=1, ac_have_gobject=0) GOBJECT_ CFLAGS) GOBJECT_ LIBS) WITH([glib2] , STRING( [--with- glib2], check@: >@])], WITH([gobject] , STRING( [--with- gobject] , check@: >@])], check]) WITH([pygobject ], STRING( [--with- pygobject] , check@: >@])], =check] ) STRING( [--with- qt4], check@: >@])], ERROR([ --with- gobject is impossible --without-glib2])]) ERROR([ --with- pygobject is impossible --without-glib2])]) ERROR([ --with- pygobject is impossible --without- gobject] )]) glib2=check MODULES( GLIB, glib-2.0, ac_have_glib2=1, ac_have_glib2=0) GLIB_CFLAGS) GLIB_LIBS) ]) (HAVE_GLIB2, test $ac_have_glib2 = 1) gobject= check MODULES( GOBJECT, gobject-2.0, ac_have_gobject=1, ac_have_gobject=0) GOBJECT_ CFLAGS) GOBJECT_ LIBS)]) (HAVE_GOBJECT, test $ac_have_gobject = 1)
-AC_SUBST(
-AC_SUBST(
-
-PKG_CHECK_
-AC_SUBST(
-AC_SUBST(
+AC_ARG_
+ [AS_HELP_
+ [support glib2 binding @<:@default=
+ [],
+ [with_glib2=check])
+
+AC_ARG_
+ [AS_HELP_
+ [support gobject binding @<:@default=
+ [],
+ [with_gobject=
+
+AC_ARG_
+ [AS_HELP_
+ [support gobject binding @<:@default=
+ [],
+ [with_pygobject
+
+AC_ARG_WITH([qt4],
+ [AS_HELP_
+ [support qt4 binding @<:@default=
+ [],
+ [with_qt4=check])
+
+##
+# parameter consistency check
+
+AS_IF([test "x$with_gobject" = xyes -a "x$with_glib2" = "xno"],
+ [AC_MSG_
+
+AS_IF([test "x$with_pygobject" = xyes -a "x$with_glib2" = "xno"],
+ [AC_MSG_
+
+AS_IF([test "x$with_pygobject" = xyes -a "x$with_gobject" = "xno"],
+ [AC_MSG_
+
+##
+# gather c and ld flags
+
+ac_have_
+AS_IF([test "x$with_glib2" != xno],
+ [PKG_CHECK_
+ AC_SUBST(
+ AC_SUBST(
+AM_CONDITIONAL
+
+ac_have_
+if test $ac_have_glib2 = 1; then
+ AS_IF([test "x$with_gobject" != xno],
+ [PKG_CHECK_
+ AC_SUBST(
+ AC_SUBST(
+fi
AM_CONDITIONAL
-PKG_CHECK_ MODULES( PYGOBJECT, pygobject-2.0, ac_have_ pygobject= 1, ac_have_ pygobject= 0) PYGOBJECT_ CFLAGS) PYGOBJECT_ LIBS) pygobject= check
-AC_SUBST(
-AC_SUBST(
+ac_have_
+if test $ac_h...