source: protocols/python/configure.ac @ e38c6d8

Last change on this file since e38c6d8 was 0075527, checked in by Nick Murdoch <nick@…>, at 2013-03-17T13:38:14Z

Add existing git project files, and modify bitlbee's build script to build the plugin.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1AC_INIT([Bitlbee Python plugin], 0.1, [https://github.com/flexo/minecraftswitch/issues], bitlbee-python, [https://github.com/flexo/minecraftswitch])
2AC_MSG_NOTICE([Configuring bitlbee-python...])
3
4AC_PROG_CC
5AC_PROG_INSTALL
6
7AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debug support (default: disabled)]), debug=yes)
8AC_MSG_CHECKING(for debug mode request)
9if test "x$debug" = "xyes" ; then
10        CFLAGS="-g -Wall -Werror"
11        AC_MSG_RESULT(yes)
12else
13        AC_MSG_RESULT(no)
14fi
15
16dnl Check for bitlbee
17AC_MSG_CHECKING(for BitlBee)
18if test -d /usr/local/lib/pkgconfig; then
19        PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
20        export PKG_CONFIG_PATH
21fi
22pkg-config --exists bitlbee
23if test "$?" != "0"; then
24        AC_MSG_RESULT(no)
25        BITLBEE="no"
26else
27        AC_MSG_RESULT(yes)
28        BITLBEE="yes"
29fi
30
31if test "$BITLBEE" = "no"; then
32        AC_ERROR([In order to use bitlbee-python you need BitlBee installed.])
33fi
34
35if test -z "$CFLAGS"; then
36        CFLAGS="`pkg-config --cflags bitlbee` `python-config --cflags`"
37else
38        CFLAGS="$CFLAGS `pkg-config --cflags bitlbee` `python-config --cflags`"
39fi
40if test -z "$LDFLAGS"; then
41        LDFLAGS="`pkg-config --libs bitlbee` `python-config --ldflags`"
42else
43        LDFLAGS="$LDFLAGS `pkg-config --libs bitlbee` `python-config --ldflags`"
44fi
45prefix=`pkg-config --variable=prefix bitlbee`
46
47case "`$CC -dumpmachine`" in
48        *linux*|*freebsd*|*netbsd*|*openbsd*)
49                SHARED_FLAGS="-fPIC -shared"
50                SHARED_EXT="so"
51                ;;
52        *apple-darwin*)
53                SHARED_FLAGS="-dynamiclib -undefined dynamic_lookup"
54                SHARED_EXT="dylib"
55                ;;
56        *)
57                AC_MSG_ERROR([Your machine is not yet supported])
58                ;;
59esac
60AC_SUBST(SHARED_FLAGS)
61AC_SUBST(SHARED_EXT)
62
63AC_OUTPUT(Makefile)
64AC_OUTPUT(config.mak)
65cp confdefs.h config.h
66
67echo "
68        BitlBee plugin:                 $BITLBEE
69        prefix:                         $prefix
70        install program:                $INSTALL
71        compiler flags:                 $CFLAGS
72        linker flags:                   $LDFLAGS
73        shared object flags:            $SHARED_FLAGS
74        shared object extension:        $SHARED_EXT"
75echo
Note: See TracBrowser for help on using the repository browser.