#checkPython python
#checkPython python2.6
#checkPython python2.5
#if test "$found_python" = "no"
#then
# { { echo "$as_me:$LINENO: error: could not find a python that can 'import simplejson'" >&5
#echo "$as_me: error: could not find a python that can 'import simplejson'" >&2;}
# { (exit 1); exit 1; }; }
#fi
Cannot find install-sh, install.sh, or shtool in ac-aux
$ libtoolize --force
$ aclocal
$ autoheader
$ automake --force-missing --add-missing
$ autoconf
$ ./configure
PYTHON = python2.6
10. make, make check, make install
11.安装成功后,查看readme里面的内容,有可执行的例子:
./examples/amqp_listen localhost 5672 amq.direct test
amqp_listen为监听程序
localhost : rabbitmq服务host 5672 : 服务开放端口
./examples/amqp_sendstring localhost 5672 amq.direct test "hello world"
amqp_sendstring为发送程序
c++客户端
1. 必须先安装c客户端环境
2. 下载源码包 https://github.com/akalend/amqpcpp
3. 按README执行即可
4. 原版本编译后是.a文件,如果要改成.so文件需要自己修改makefile,步骤如下
a. 修改CFLAGS变量, 增加-fPIC -shared参数
b.LIBFILE = lib$(LIBNAME).so
c. 修改$(LIBFILE)的编译语句, 屏蔽原来的 $(AR) 命令, 改成 $(CXX) $(CPPFLAGS) -o $@ $(OBJECTS)
$(LIBFILE): $(OBJECTS)
# $(AR) rcs $@ $(OBJECTS)
$(CXX) $(CPPFLAGS) -o $@ $(OBJECTS)