diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2008-09-05 21:54:45 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2008-09-05 21:54:45 +0200 |
commit | 752a591bea8d2d3b4e9529a8220f46e54389cc0c (patch) | |
tree | ff2d6bf9a1bf80d60e1bbbd66a9252f95b2d79be | |
parent | ef399c287aa73adc0c9bbd587127b1fafd071179 (diff) |
make bitlbee dependency optional as well
this way it's possible to build bitlbee-skype on a client where only
skyped will be running, so messing with the plugin makes no sense
-rw-r--r-- | skype/Makefile | 5 | ||||
-rw-r--r-- | skype/config.mak.in | 1 | ||||
-rw-r--r-- | skype/configure.ac | 48 |
3 files changed, 42 insertions, 12 deletions
diff --git a/skype/Makefile b/skype/Makefile index fd298f20..3a23c488 100644 --- a/skype/Makefile +++ b/skype/Makefile @@ -7,11 +7,15 @@ BITLBEE_VERSION = 1.2.2 AMVERSION = $(shell automake --version|sed 's/.* //;s/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/;q') skype.$(SHARED_EXT): skype.c config.mak +ifeq ($(BITLBEE),yes) $(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS) +endif install: skype.$(SHARED_EXT) skyped.py +ifeq ($(BITLBEE),yes) $(INSTALL) -d $(DESTDIR)$(plugindir) $(INSTALL) skype.$(SHARED_EXT) $(DESTDIR)$(plugindir) +endif ifeq ($(SKYPED),yes) $(INSTALL) -d $(DESTDIR)$(bindir) $(INSTALL) -d $(DESTDIR)$(sysconfdir) @@ -26,7 +30,6 @@ client: client.c autogen: configure.ac cp /usr/share/automake-$(AMVERSION)/install-sh ./ - cp /usr/share/aclocal/pkg.m4 aclocal.m4 autoconf clean: diff --git a/skype/config.mak.in b/skype/config.mak.in index e133ed87..443343c5 100644 --- a/skype/config.mak.in +++ b/skype/config.mak.in @@ -3,6 +3,7 @@ LDFLAGS = @LDFLAGS@ SHARED_FLAGS = @SHARED_FLAGS@ SHARED_EXT = @SHARED_EXT@ SKYPE4PY = @SKYPE4PY@ +BITLBEE = @BITLBEE@ INSTALL = @INSTALL@ prefix = @prefix@ sysconfdir = @sysconfdir@/skyped diff --git a/skype/configure.ac b/skype/configure.ac index ff28e5eb..8aa5d688 100644 --- a/skype/configure.ac +++ b/skype/configure.ac @@ -28,10 +28,27 @@ AC_SUBST(SHARED_FLAGS) AC_SUBST(SHARED_EXT) dnl Check for bitlbee -PKG_CHECK_MODULES(BITLBEE, bitlbee) -CFLAGS="$CFLAGS $BITLBEE_CFLAGS" -LDFLAGS="$LDFLAGS $BITLBEE_LIBS" -prefix=`$PKG_CONFIG --variable=prefix bitlbee` +AC_MSG_CHECKING(for BitlBee) +pkg-config --exists bitlbee +if test "$?" != "0"; then + AC_MSG_RESULT(no) + BITLBEE="no" +else + AC_MSG_RESULT(yes) + BITLBEE="yes" + if test -z "$CFLAGS"; then + CFLAGS="`pkg-config --cflags bitlbee`" + else + CFLAGS="$CFLAGS `pkg-config --cflags bitlbee`" + fi + if test -z "$LDFLAGS"; then + LDFLAGS="`pkg-config --libs bitlbee`" + else + LDFLAGS="$LDFLAGS `pkg-config --libs bitlbee`" + fi + prefix=`pkg-config --variable=prefix bitlbee` +fi +AC_SUBST(BITLBEE) dnl Check for Skype4Py AC_MSG_CHECKING(for Python module Skype4Py) @@ -45,16 +62,25 @@ else fi AC_SUBST(SKYPE4PY) +if test "$BITLBEE" = "no" -a "$SKYPE4PY" = "no"; then + AC_ERROR([In order to use bitlbee-skype you need at least BitlBee or Skype4Py installed.]) +fi + AC_OUTPUT(config.mak) AC_OUTPUT(skyped.conf.dist) echo " - compiler flags: $CFLAGS - linker flags: $LDFLAGS - shared object flags: $SHARED_FLAGS - shared object extension: $SHARED_EXT + BitlBee plugin: $BITLBEE skyped: $SKYPE4PY - install program: $INSTALL prefix: $prefix - sysconfig dir: $sysconfdir/skyped -" + install program: $INSTALL" +if test "$BITLBEE" = "yes"; then + echo " compiler flags: $CFLAGS + linker flags: $LDFLAGS + shared object flags: $SHARED_FLAGS + shared object extension: $SHARED_EXT" +fi +if test "$SKYPE4PY" = "yes"; then + echo " sysconfig dir: $sysconfdir/skyped" +fi +echo |