zoukankan      html  css  js  c++  java
  • autoconf & automake

    1、Function of these two tools:

    Generate shell script file "configure" for our source code, which can help to configure our source code in different unix-like system and generate file "Makefile".Then we can use instructions such as "./configure"、"make"、"make install" to install program in linux.

    2、Steps:

    1)、edit "helloworld.c"(our source code).

    2)、edit "configure.in"(use autoscan to generate a template for configure.in)

    configure.in
    #                                               -*- Autoconf -*-
    # Process this file with autoconf to produce a configure script.
    
    AC_INIT(helloworld.c)
    AM_INIT_AUTOMAKE(helloworld,1.0)
    
    # Checks for programs.
    AC_PROG_CC
    
    # Checks for libraries.
    
    # Checks for header files.
    
    # Checks for typedefs, structures, and compiler characteristics.
    
    # Checks for library functions.
    
    AC_OUTPUT(Makefile)

    3)、aclocal(generate "aclocal.m4")    autoconf(generate "configure")

    4)、edit "Makefile.am"

    Makefile.am
    AUTOMAKE_OPTIONS=foreign
    bin_PROGRAMS=helloworld
    helloworld_SOURCES=helloworld.c

    5)、automake --add-missing ; ./configure  ; make

    3、Introduction in details:

          http://www.laruence.com/2009/11/18/1154.html

  • 相关阅读:
    脱离Table组件的render苦海
    激活码
    Unittest
    IO多路复用-EPOOL 详细
    PIL-Image、ImageDraw图像标记
    Mysql专场
    xshell命令
    并发编程
    Mysql高级用法
    视图函数中进行sql查询,防止sql注入
  • 原文地址:https://www.cnblogs.com/hshuzhao/p/3029047.html
Copyright © 2011-2022 走看看