An error occurred while compiling the autotools tool. Why?

Source: Internet
Author: User
Tags automake
Autotools tool compilation error, I do not know why-Linux general technology-Linux programming and kernel information, the following is a detailed reading. # Cd auto
# Ls
Add. c add. h main. c
* *********** The content of the file is as follows ************
/* Add. c */
Int add (int I, int j)
{
Int s;
S = I + j;
Return s;
}

/* Add. h */
Extern int add (int I, int j)
/* Main. c */
Void main ()
{
Int a = 1, B = 2;
Printf ("a + B = % d \ n", add (a, B ));
}
**************************************
# Autoscan
# Ls
Add. c add. h main. c autoscan. log configure. scan main. c
# Mv configure. scan configure. in
**********
# Cat configure. in
#-*-Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ (2.61)
AC_INIT (FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR ([add. h])
AC_CONFIG_HEADER ([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_OUTPUT
* ******** The content of the above unmodified configure. in File
*****************
# Vi configure. in
#-*-Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ (2.61)
AC_INIT (main, 1.0, liujianqiao0426@163.com) # modified
AC_CONFIG_SRCDIR ([main. c]) # modified
AM_CONFIG_HEADER ([config. h]) # The AC is changed to AM.
AM_INIT_AUTOMAKE (main, 1.0) # added a row.
# 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_OUTPUT9 ([Makefile)] # output file
* ***** The above is the modified configure. in File ********
**************************************** **
# Aclocal
* *** The following is the output information *****
/Usr/share/aclocal/ao. m4: 9: warning: underquoted definition of XIPH_PATH_AO
Run into '(automake) Extending aclocal'
Or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
# Ls
Aclocal. m4 add. c add. h autom4te. cache autoscan. log configure. in main. c
# Autoconf
# Ls
Aclocal. m4 add. c add. h autom4te. cache autoscan. log configure. in main. c
# Autoheader
# Ls
Aclocal. m4 add. c add. h autom4te. cache autoscan. log configure. in config. h. in main. c
# Vi Makefile. am
AUTOMAKE_OPTIONS = foreign
Bin_PROGRAMS = main
Main_SOURCES = main. c add. c
# Automake -- add-missing
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.