automake & autoconf

systerm:Linux ubuntu 2.6.32-24-generic ;

automake & autoconf : 1.11.1


一、指令 autoscan;

        输出 configure.scan;

二、指令 mv configure.scan configure.in

        指令  vim configure.in

        输出 configure.in

configure.in:

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.


AC_PREREQ([2.65])
AC_INIT(ET, 1.0, liangliang0918@126.com) # 名称,版本,邮箱
AM_INIT_AUTOMAKE(ET, 1.0) #手动加入的新宏,名称,版本
AC_CONFIG_HEADERS(config.h)#


# Checks for programs.
AC_PROG_CXX
AC_PROG_CC


# Checks for libraries.
AC_PROG_RANLIB # 静态 .a 文件打包


# Checks for header files.
AC_CHECK_HEADERS([sys/time.h])


# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL


# Checks for library functions.
AC_CHECK_FUNCS([gettimeofday])


AC_OUTPUT(Makefile src/Makefile)# 输出文件,用空格分隔


三、指令 aclocal

       输入 configure.in

       输出 aclocal.m4


四、指令 autoconf

       输入 configure.in aclocal.m4

        输出 configure


五、指令 automake

        输入 Makefile.am configure.in

       输出  Makefile.in

Makefile.am:

SUBDIRS=src/
CURRENTPATH=$`pwd`
INCLUDES=-I$(CURRENTPATH)/src/
export INCLUDES


src/Makefile.am:

lib_LIBRARIES=libeventloop.a
libeventloop_a_SOURCES=eventloop.cpp \
             creatorpoller.cpp \
             epollpoller.cpp \
             IOwatcher.cpp \
             poller.cpp \
             watcher.cpp
INCLUDES=-I$(top_srcdir)/src/
etincludedir=$(includedir)/swap
etinclude_HEADERS=$(top_srcdir)/src/eventloop.h


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值