[ca911b4] | 1 | AC_INIT([Skype plugin for BitlBee], 1.0, [vmiklos@vmiklos.hu], bitlbee-skype) |
---|
[68312b8] | 2 | AC_PROG_CC |
---|
| 3 | AC_PROG_INSTALL |
---|
| 4 | |
---|
| 5 | AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debug support (default: disabled)]), debug=yes) |
---|
| 6 | AC_MSG_CHECKING(for debug mode request) |
---|
[eb4b91c] | 7 | if test "x$debug" = "xyes" ; then |
---|
[68312b8] | 8 | CFLAGS="-g -Wall -Werror" |
---|
| 9 | AC_MSG_RESULT(yes) |
---|
| 10 | else |
---|
| 11 | AC_MSG_RESULT(no) |
---|
| 12 | fi |
---|
| 13 | |
---|
[df1a59d4] | 14 | case "`$CC -dumpmachine`" in |
---|
[7f41495] | 15 | *linux*|*freebsd*|*netbsd*) |
---|
[ab165c5] | 16 | SHARED_FLAGS="-fPIC -shared" |
---|
[df1a59d4] | 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 | ;; |
---|
| 26 | esac |
---|
| 27 | AC_SUBST(SHARED_FLAGS) |
---|
| 28 | AC_SUBST(SHARED_EXT) |
---|
| 29 | |
---|
[68312b8] | 30 | dnl Check for bitlbee |
---|
[752a591] | 31 | AC_MSG_CHECKING(for BitlBee) |
---|
[85ebf71] | 32 | if test -d /usr/local/lib/pkgconfig; then |
---|
| 33 | PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig |
---|
| 34 | export PKG_CONFIG_PATH |
---|
| 35 | fi |
---|
[752a591] | 36 | pkg-config --exists bitlbee |
---|
| 37 | if test "$?" != "0"; then |
---|
| 38 | AC_MSG_RESULT(no) |
---|
| 39 | BITLBEE="no" |
---|
| 40 | else |
---|
| 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` |
---|
| 54 | fi |
---|
| 55 | AC_SUBST(BITLBEE) |
---|
[69939608] | 56 | |
---|
[cc7a153] | 57 | dnl Check for a2x |
---|
| 58 | AC_ARG_ENABLE([asciidoc], AS_HELP_STRING([--disable-asciidoc], [Disable asciidoc support (default: test)])) |
---|
| 59 | if test "$enable_asciidoc" != "no"; then |
---|
| 60 | AC_CHECK_PROG(ASCIIDOC, asciidoc, yes, []) |
---|
| 61 | fi |
---|
| 62 | |
---|
[69939608] | 63 | dnl Check for Skype4Py |
---|
| 64 | AC_MSG_CHECKING(for Python module Skype4Py) |
---|
[1ce52ec] | 65 | python2.7 -c "import Skype4Py" 2>&AS_MESSAGE_LOG_FD |
---|
[69939608] | 66 | if test "$?" != "0"; then |
---|
| 67 | AC_MSG_RESULT(no) |
---|
| 68 | SKYPE4PY="no" |
---|
| 69 | else |
---|
| 70 | AC_MSG_RESULT(yes) |
---|
| 71 | SKYPE4PY="yes" |
---|
| 72 | fi |
---|
| 73 | AC_SUBST(SKYPE4PY) |
---|
| 74 | |
---|
[752a591] | 75 | if test "$BITLBEE" = "no" -a "$SKYPE4PY" = "no"; then |
---|
| 76 | AC_ERROR([In order to use bitlbee-skype you need at least BitlBee or Skype4Py installed.]) |
---|
| 77 | fi |
---|
| 78 | |
---|
[68312b8] | 79 | AC_OUTPUT(config.mak) |
---|
[c7304b2] | 80 | AC_OUTPUT(skyped.conf.dist) |
---|
[aa4e3ed] | 81 | |
---|
| 82 | echo " |
---|
[752a591] | 83 | BitlBee plugin: $BITLBEE |
---|
[69939608] | 84 | skyped: $SKYPE4PY |
---|
[aa4e3ed] | 85 | prefix: $prefix |
---|
[752a591] | 86 | install program: $INSTALL" |
---|
| 87 | if test "$BITLBEE" = "yes"; then |
---|
| 88 | echo " compiler flags: $CFLAGS |
---|
| 89 | linker flags: $LDFLAGS |
---|
| 90 | shared object flags: $SHARED_FLAGS |
---|
| 91 | shared object extension: $SHARED_EXT" |
---|
| 92 | fi |
---|
| 93 | if test "$SKYPE4PY" = "yes"; then |
---|
| 94 | echo " sysconfig dir: $sysconfdir/skyped" |
---|
| 95 | fi |
---|
| 96 | echo |
---|