1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| $ cd helloworld $ autoscan $ mv configure.scan configure.ac $ vi configure.ac # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT([helloworld], [1.0], [email@domain.com]) 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 src/Makefile ]) AC_OUTPUT $ vi src/Makefile.am bin_PROGRAMS = helloworld helloworld_SOURCES = main.c hello.c $ vi Makefile.am SUBDIRS = src dist_doc_DATA = README.md $ autoreconf --install $ ./configure $ make $ ./src/helloworld
|