source: skype/configure.ac @ 88c2cc3

Last change on this file since 88c2cc3 was 85ebf71, checked in by Miklos Vajna <vmiklos@…>, at 2008-09-07T22:09:28Z

add/usr/local/lib/pkgconfig to PKG_CONFIG_PATH automatically if it makes sense

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[ca911b4]1AC_INIT([Skype plugin for BitlBee], 1.0, [vmiklos@vmiklos.hu], bitlbee-skype)
[68312b8]2AC_PROG_CC
3AC_PROG_INSTALL
4
5AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debug support (default: disabled)]), debug=yes)
6AC_MSG_CHECKING(for debug mode request)
[eb4b91c]7if test "x$debug" = "xyes" ; then
[68312b8]8        CFLAGS="-g -Wall -Werror"
9        AC_MSG_RESULT(yes)
10else
11        AC_MSG_RESULT(no)
12fi
13
[df1a59d4]14case "`$CC -dumpmachine`" in
15        *linux*)
16                SHARED_FLAGS="-shared"
17                SHARED_EXT="so"
18                ;;
19        *apple-darwin*)
[89949c7]20                SHARED_FLAGS="-dynamiclib -undefined dynamic_lookup"
[446c6ff]21                SHARED_EXT="dylib"
[df1a59d4]22                ;;
23        *)
24                AC_MSG_ERROR([Your machine is not yet supported])
25                ;;
26esac
27AC_SUBST(SHARED_FLAGS)
28AC_SUBST(SHARED_EXT)
29
[68312b8]30dnl Check for bitlbee
[752a591]31AC_MSG_CHECKING(for BitlBee)
[85ebf71]32if test -d /usr/local/lib/pkgconfig; then
33        PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
34        export PKG_CONFIG_PATH
35fi
[752a591]36pkg-config --exists bitlbee
37if test "$?" != "0"; then
38        AC_MSG_RESULT(no)
39        BITLBEE="no"
40else
41        AC_MSG_RESULT(yes)
42        BITLBEE="yes"
43        if test -z "$CFLAGS"; then
44                CFLAGS="`pkg-config --cflags bitlbee`"
45        else
46                CFLAGS="$CFLAGS `pkg-config --cflags bitlbee`"
47        fi
48        if test -z "$LDFLAGS"; then
49                LDFLAGS="`pkg-config --libs bitlbee`"
50        else
51                LDFLAGS="$LDFLAGS `pkg-config --libs bitlbee`"
52        fi
53        prefix=`pkg-config --variable=prefix bitlbee`
54fi
55AC_SUBST(BITLBEE)
[69939608]56
57dnl Check for Skype4Py
58AC_MSG_CHECKING(for Python module Skype4Py)
[ef399c2]59python -c "import Skype4Py" 2>&AS_MESSAGE_LOG_FD
[69939608]60if test "$?" != "0"; then
61        AC_MSG_RESULT(no)
62        SKYPE4PY="no"
63else
64        AC_MSG_RESULT(yes)
65        SKYPE4PY="yes"
66fi
67AC_SUBST(SKYPE4PY)
68
[752a591]69if test "$BITLBEE" = "no" -a "$SKYPE4PY" = "no"; then
70        AC_ERROR([In order to use bitlbee-skype you need at least BitlBee or Skype4Py installed.])
71fi
72
[68312b8]73AC_OUTPUT(config.mak)
[c7304b2]74AC_OUTPUT(skyped.conf.dist)
[aa4e3ed]75
76echo "
[752a591]77        BitlBee plugin:                 $BITLBEE
[69939608]78        skyped:                         $SKYPE4PY
[aa4e3ed]79        prefix:                         $prefix
[752a591]80        install program:                $INSTALL"
81if test "$BITLBEE" = "yes"; then
82        echo "  compiler flags:                 $CFLAGS
83        linker flags:                   $LDFLAGS
84        shared object flags:            $SHARED_FLAGS
85        shared object extension:        $SHARED_EXT"
86fi
87if test "$SKYPE4PY" = "yes"; then
88        echo "  sysconfig dir:                  $sysconfdir/skyped"
89fi
90echo
Note: See TracBrowser for help on using the repository browser.