Premise: assume that this program is called the vso path: \ vso \ src \ vso \ test. The steps below only contain the source code directory. If you create the makefile of test, it is similar. 1. cd \ vsoautoscan2.mvconfigure. scanconfigure. in3.vimconfigure. inas :---------------
Premise: Assume this program is called vso.
Path:
\ Vso
\ Vso \ src
\ Vso \ test
The following steps only contain the source code directory. If you create the makefile for test, it is similar.
1. cd \ vso
Autoscan
2. mv configure. scan configure. in
3. vim configure. in
As:
---------------------------------
AC_PREREQ (2.59)
AC_INIT (vso, 0.0.1, sun.noon@gmail.com)
AC_CONFIG_SRCDIR ([src/PlotWindow. cpp])
AC_CONFIG_HEADER ([config. h])
AM_INIT_AUTOMAKE (vso, 0.0.1)
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
# Checks for libraries.
AM_OPTIONS_WXCONFIG
Reqwx = 2.8.10
AM_PATH_WXCONFIG ($ reqwx, wxWin = 1)
If test "$ wxWin "! = 1; then
AC_MSG_ERROR ([
WxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
Where wxWidgets libraries are installed (returned
'Wx-config -- libs' or 'wx-config -- static -- libs' command)
Is in LD_LIBRARY_PATH or equivalent variable and
WxWidgets version is $ reqwx or above.
])
Fi
CPPFLAGS = "$ CPPFLAGS $ WX_CPPFLAGS"
CXXFLAGS = "$ CXXFLAGS $ WX_CXXFLAGS_ONLY"
CFLAGS = "$ CFLAGS $ WX_CFLAGS_ONLY"
LIBS = "$ LIBS $ WX_LIBS"
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS ([limits. h stdlib. h string. h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_CHECK_FUNCS ([sqrt])
AC_CONFIG_FILES ([Makefile
Src/Makefile])
AC_OUTPUT
----------------------------------
4. touch news readme ChangeLog AUTHORS
5. cd src
Vim Makefile. am
As:
--------------
Bin_PROGRAMS = vso
Vso_SOURCES = a. h a. cpp B. h B. cpp c. h c. cpp
Vso_LDADD = @ LIBS @
Vso_CXXFLAGS = @ CXXFLAGS @
--------------
6. cd ..
Vim Makefile. am
As:
--------------
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src
--------------
7.
Aclocal
Autoheader
Autoconf
Automake -- add-missing
8. Finished !!
Usage:
./Configure
Make
Enjoy it!