[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 |
---|
| 15 | *linux*) |
---|
| 16 | SHARED_FLAGS="-shared" |
---|
| 17 | SHARED_EXT="so" |
---|
| 18 | ;; |
---|
| 19 | *apple-darwin*) |
---|
| 20 | SHARED_FLAGS="-dynamiclib -Wl,-headerpad_max_install_names,-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) |
---|
| 32 | pkg-config --exists bitlbee |
---|
| 33 | if test "$?" != "0"; then |
---|
| 34 | AC_MSG_RESULT(no) |
---|
| 35 | BITLBEE="no" |
---|
| 36 | else |
---|
| 37 | AC_MSG_RESULT(yes) |
---|
| 38 | BITLBEE="yes" |
---|
| 39 | if test -z "$CFLAGS"; then |
---|
| 40 | CFLAGS="`pkg-config --cflags bitlbee`" |
---|
| 41 | else |
---|
| 42 | CFLAGS="$CFLAGS `pkg-config --cflags bitlbee`" |
---|
| 43 | fi |
---|
| 44 | if test -z "$LDFLAGS"; then |
---|
| 45 | LDFLAGS="`pkg-config --libs bitlbee`" |
---|
| 46 | else |
---|
| 47 | LDFLAGS="$LDFLAGS `pkg-config --libs bitlbee`" |
---|
| 48 | fi |
---|
| 49 | prefix=`pkg-config --variable=prefix bitlbee` |
---|
| 50 | fi |
---|
| 51 | AC_SUBST(BITLBEE) |
---|
[69939608] | 52 | |
---|
| 53 | dnl Check for Skype4Py |
---|
| 54 | AC_MSG_CHECKING(for Python module Skype4Py) |
---|
[ef399c2] | 55 | python -c "import Skype4Py" 2>&AS_MESSAGE_LOG_FD |
---|
[69939608] | 56 | if test "$?" != "0"; then |
---|
| 57 | AC_MSG_RESULT(no) |
---|
| 58 | SKYPE4PY="no" |
---|
| 59 | else |
---|
| 60 | AC_MSG_RESULT(yes) |
---|
| 61 | SKYPE4PY="yes" |
---|
| 62 | fi |
---|
| 63 | AC_SUBST(SKYPE4PY) |
---|
| 64 | |
---|
[752a591] | 65 | if test "$BITLBEE" = "no" -a "$SKYPE4PY" = "no"; then |
---|
| 66 | AC_ERROR([In order to use bitlbee-skype you need at least BitlBee or Skype4Py installed.]) |
---|
| 67 | fi |
---|
| 68 | |
---|
[68312b8] | 69 | AC_OUTPUT(config.mak) |
---|
[c7304b2] | 70 | AC_OUTPUT(skyped.conf.dist) |
---|
[aa4e3ed] | 71 | |
---|
| 72 | echo " |
---|
[752a591] | 73 | BitlBee plugin: $BITLBEE |
---|
[69939608] | 74 | skyped: $SKYPE4PY |
---|
[aa4e3ed] | 75 | prefix: $prefix |
---|
[752a591] | 76 | install program: $INSTALL" |
---|
| 77 | if test "$BITLBEE" = "yes"; then |
---|
| 78 | echo " compiler flags: $CFLAGS |
---|
| 79 | linker flags: $LDFLAGS |
---|
| 80 | shared object flags: $SHARED_FLAGS |
---|
| 81 | shared object extension: $SHARED_EXT" |
---|
| 82 | fi |
---|
| 83 | if test "$SKYPE4PY" = "yes"; then |
---|
| 84 | echo " sysconfig dir: $sysconfdir/skyped" |
---|
| 85 | fi |
---|
| 86 | echo |
---|