summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmzullinger@users.sourceforge.net>2007-11-26 18:37:30 +0000
committerTodd Zullinger <tmzullinger@users.sourceforge.net>2007-11-26 18:37:30 +0000
commit6ea6335f1bbe780d0ad1cc7bf52f782d87100b49 (patch)
treec7642792f00c78cd06914b84f59137a7a860bb88
parentf7fd15e731b762e0357b3ccf21bafa64013be32b (diff)
downloadlibgpod-6ea6335f1bbe780d0ad1cc7bf52f782d87100b49.tar.gz
libgpod-6ea6335f1bbe780d0ad1cc7bf52f782d87100b49.tar.xz
libgpod-6ea6335f1bbe780d0ad1cc7bf52f782d87100b49.zip
conditionally add gdk-pixbuf to pkg-config Requires
exit with an error if gdk-pixbuf or pygobject are explicitly requested and not found add AM_PROG_CC_C_O to make automake happy about per-target flags in tests/Makefile.am git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1804 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog10
-rw-r--r--configure.ac40
-rw-r--r--libgpod-1.0.pc.in2
3 files changed, 38 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 2065587..db3fe9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-11-26 Todd Zullinger <tmzullinger at users.sourceforge.net>
+
+ * configure.ac
+ libgpod-1.0.pc.in:
+ conditionally add gdk-pixbuf to pkg-config Requires.
+ exit with an error if gdk-pixbuf or pygobject are explicitly
+ requested and not found.
+ add AM_PROG_CC_C_O to make automake happy about per-target
+ flags in tests/Makefile.am
+
2007-11-25 Todd Zullinger <tmzullinger at users.sourceforge.net>
* autogen.sh: pass any user-specified options to configure
diff --git a/configure.ac b/configure.ac
index 8a97c0a..308f2c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,7 @@ AM_MAINTAINER_MODE
AC_GNU_SOURCE
AC_PROG_CC
+AM_PROG_CC_C_O
# AC_PROG_CXX is only needed for the test program tests/test-rebuild-db.cc.
# You can safely remove AC_PROG_CXX and the test program (edit tests/Makefile.am)
@@ -134,19 +135,27 @@ dnl **************************************************
AC_ARG_ENABLE(gdk-pixbuf, [AC_HELP_STRING([--disable-gdk-pixbuf],[ArtworkDB will be disabled without gdk-pixbuf])],
[case "${enableval}" in
- no) have_gdkpixbuf=no ;;
- *) have_gdkpixbuf=yes;;
-esac], have_gdkpixbuf=yes)
+ no) enable_gdkpixbuf=no ;;
+ *) enable_gdkpixbuf=yes;;
+esac])
AH_TEMPLATE([HAVE_GDKPIXBUF], [Whether gdk-pixbuf is installed, ArtworkDB writing support will be disabled if it can't be found])
-if test x$have_gdkpixbuf = xyes; then
- PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0 >= 2.6.0, have_gdkpixbuf=yes, have_gdkpixbuf=no)
- if test x"$have_gdkpixbuf" = xyes; then
- AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF, 1)
+if test x$enable_gdkpixbuf != xno; then
+ GDKPIXBUF_REQ="gdk-pixbuf-2.0"
+ PKG_CHECK_MODULES(GDKPIXBUF, $GDKPIXBUF_REQ >= 2.6.0, have_gdkpixbuf=yes, have_gdkpixbuf=no)
+ if test x"$enable_gdkpixbuf" = xyes -a x"$have_gdkpixbuf" = xno; then
+ AC_MSG_ERROR([gdk-pixbuf support explicitly requested but gdk-pixbuf couldn't be found])
fi
+fi
+if test x"$have_gdkpixbuf" = xyes; then
+ AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF, 1)
LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $GDKPIXBUF_CFLAGS"
LIBGPOD_LIBS="$LIBGPOD_LIBS $GDKPIXBUF_LIBS"
+else
+ have_gdkpixbuf=no
+ GDKPIXBUF_REQ=""
fi
AM_CONDITIONAL(HAVE_GDKPIXBUF, test x"$have_gdkpixbuf" = xyes)
+AC_SUBST(GDKPIXBUF_REQ)
dnl **************************************************
dnl * PYGOBJECT is optional
@@ -154,17 +163,22 @@ dnl **************************************************
AC_ARG_ENABLE(pygobject, [AC_HELP_STRING([--disable-pygobject],[Python API will lack GdkPixbuf support without PyGOBJECT])],
[case "${enableval}" in
- no) have_pygobject=no ;;
- *) have_pygobject=yes;;
-esac], have_pygobject=yes)
+ no) enable_pygobject=no ;;
+ *) enable_pygobject=yes;;
+esac])
AH_TEMPLATE([HAVE_PYGOBJECT], [Whether pygobject is installed, Python API will lack GdkPixbuf support without PyGOBJECT])
-if test x$have_pygobject = xyes; then
+if test x$enable_pygobject != xno; then
PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= 2.8.0, have_pygobject=yes, have_pygobject=no)
- if test x"$have_pygobject" = xyes; then
- AC_DEFINE_UNQUOTED(HAVE_PYGOBJECT, 1)
+ if test x"$enable_pygobject" = xyes -a x"$have_pygobject" = xno; then
+ AC_MSG_ERROR([pygobject support explicitly requested but pygobject couldn't be found])
fi
+fi
+if test x"$have_pygobject" = xyes; then
+ AC_DEFINE_UNQUOTED(HAVE_PYGOBJECT, 1)
LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $PYGOBJECT_CFLAGS"
LIBGPOD_LIBS="$LIBGPOD_LIBS $PYGOBJECT_LIBS"
+else
+ have_pygobject=no
fi
AM_CONDITIONAL(HAVE_PYGOBJECT, test x"$have_pygobject" = xyes)
diff --git a/libgpod-1.0.pc.in b/libgpod-1.0.pc.in
index 747a7b9..808dd78 100644
--- a/libgpod-1.0.pc.in
+++ b/libgpod-1.0.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: libgpod
Description: A library to manipulate songs and playlists stored on an ipod
Version: @VERSION@
-Requires: glib-2.0 >= 2.8.0 gobject-2.0
+Requires: glib-2.0 >= 2.8.0 gobject-2.0 @GDKPIXBUF_REQ@
Libs: -L${libdir} -lgpod
Cflags: -I${includedir}/gpod-1.0