1. 环境准备:安装 gcc, autoconf, automake, libtool, gettext, dh-make和debhelper等包;
2. 在/home/workroom/test目录下写一个简单的测试程序test.c:
#include <stdio.h>
void main()
{
printf("Hello world!\r\n");
}
3. 在/home/workroom/test目录下运行 autoscan产生基本的 configure.scan文件,打开该文件,并添加红色的几行,然后另存为configure.ac。
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68]) AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) AC_CONFIG_SRCDIR([test.c]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([config.h])
# 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_CONFIG_FILES([ Makefile ]) AC_OUTPUT |
4. 手工生成一个autogen.sh文件,内容如下:
#! /bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreeme |