PKG_CHECK_MODULES(LIBNL, libnl-1, ac_have_libnl=1,ac_have_libnl=0)
AC_SUBST(LIBNL_CFLAGS)
AC_SUBST(LIBNL_LIBS)
AM_CONDITIONAL(HAVE_LIBNL, test $ac_have_libnl = 1)
+# consistency checks
if ! test "$ac_have_libnl" = "1"; then
AC_ERROR([libnl is required])
fi
+AS_IF([test x$with_glib2 = xyes -a $ac_have_glib2 != 1],
+ [AC_MSG_ERROR([with-glib2 set, but build dependencies not fulfilled, you need glib-2.0 .pc file in PKG_CONFIG_PATH])]
+)
+
AC_OUTPUT(
Makefile
common/Makefile common/test/Makefile
------- ------- ------- ------- ------- ------- ------- ------- ---- /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 MODULES( PYGOBJECT, pygobject-2.0, ac_have_ pygobject= 1, ac_have_ pygobject= 0) PYGOBJECT_ CFLAGS) PYGOBJECT_ LIBS)]) (HAVE_PYGOBJECT , test $ac_have_pygobject = 1)
-AC_SUBST(
-AC_SUBST(
+ac_have_
+if test $ac_have_gobject = 1; then
+ AS_IF([test "x$with_pygobject" != xno],
+ [PKG_CHECK_
+ AC_SUBST(
+ AC_SUBST(
+fi
AM_CONDITIONAL
-PKG_CHECK_ MODULES( QTCORE, QtCore) QTCORE_ CFLAGS) QTCORE_ LIBS) MODULES( QTCORE, QtCore, ac_have_qt4=1, ac_have_qt4=0) QTCORE_ CFLAGS) QTCORE_ LIBS)]) (HAVE_QT4, test $ac_have_qt4 = 1)
-AC_SUBST(
-AC_SUBST(
+ac_have_qt4=check
+AS_IF([test "x$with_qt4" != xno],
+ [PKG_CHECK_
+ AC_SUBST(
+ AC_SUBST(
+AM_CONDITIONAL
PKG_CHECK_ MODULES( LIBNL, libnl-1, ac_have_ libnl=1, ac_have_ libnl=0) LIBNL_CFLAGS) LIBNL_LIBS) (HAVE_LIBNL, test $ac_have_libnl = 1)
AC_SUBST(
AC_SUBST(
AM_CONDITIONAL
+# consistency checks
if ! test "$ac_have_libnl" = "1"; then
AC_ERROR([libnl is required])
fi
+AS_IF([test x$with_glib2 = xyes -a $ac_have_glib2 != 1], ERROR([ with-glib2 set, but build dependencies not fulfilled, you need glib-2.0 .pc file in PKG_CONFIG_PATH])] test/Makefile
+ [AC_MSG_
+)
+
AC_OUTPUT(
Makefile
common/Makefile common/