-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
130 lines (103 loc) · 4.95 KB
/
configure.ac
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#=========================================================================
# Toplevel configure.ac for the Modular C++ Build System
#=========================================================================
# Please read the documenation in 'mcppbs-doc.txt' for more details on
# how the Modular C++ Build System works. For most new projects, a
# developer will only need to change the project metadata listed right
# below, and update which subprojects to include as part of this
# project. Do not place any configure checks here which will be used by
# a subproject - instead place such checks in the subproject's autoconf
# fragment.
#-------------------------------------------------------------------------
# Project metadata
#-------------------------------------------------------------------------
m4_define( proj_name, [Miscellaneous])
m4_define( proj_maintainer, [Christopher Batten])
m4_define( proj_abbreviation, [pymtl-polyhs])
#-------------------------------------------------------------------------
# Project version information
#-------------------------------------------------------------------------
# Version information is meant to be managed through a version control
# system's tags and revision numbers. In a working copy the version will
# not be defined here (you should just use the version control system's
# mechanisms). When we make a distribution then we can set the version
# here as formed by the scripts/vcs-version.sh script so that the
# distribution knows what version it came from. If you are not using
# version control then it is fine to set this directly.
m4_define( proj_version, [?])
#-------------------------------------------------------------------------
# Setup
#-------------------------------------------------------------------------
AC_INIT(proj_name,proj_version,proj_maintainer,proj_abbreviation)
AC_CONFIG_SRCDIR([utst/utst.ac])
AC_CONFIG_AUX_DIR([scripts])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
#-------------------------------------------------------------------------
# Basic checks
#-------------------------------------------------------------------------
# Check for C compiler and set default C compiler flags
AC_PROG_CC
AC_SUBST([CFLAGS],["-Wall -g -O3"])
# Check for C++ compiler and set default C++ compiler flags
AC_PROG_CXX
AC_SUBST([CXXFLAGS],["-Wall -g -O3"])
# Check for tools to build libraries
AC_CHECK_TOOL([AR],[ar])
AC_CHECK_TOOL([RANLIB],[ranlib])
#-------------------------------------------------------------------------
# MCPPBS specific setup
#-------------------------------------------------------------------------
# Initialize the modular C++ build system
MCPPBS_INIT
# Use C++ compiler even for assembly and C source files
MCPPBS_ALWAYS_USE_CXX
# Checks for install script and the stow program. Setup --enable-stow
# command line flag for stow-based installs.
MCPPBS_PROG_INSTALL
# Check for an isa simulator with the name host-isa-run or host-run.
# This simulator will be used for running unit test programs in
# non-native builds.
MCPPBS_PROG_RUN
# Setup high-level synthesis
MCPPBS_HLS
#-------------------------------------------------------------------------
# MCPPBS subproject includes
#-------------------------------------------------------------------------
# Specify which subprojects make up this project. Subprojects can either
# be internal (ie. a subdirectory in the source directory) or external
# (ie. as an installed library). For external subprojects we use
# pkg-config to link against the appropriate library. Optional
# subprojects are denoted with an asterisk and are enabled with a
# --with-<subproject> configure command line option. Order the list so
# that subprojects only depend on those listed earlier. Here is an
# example project which includes four subprojects: the first is the
# standard utst subproject which has been installed and thus is being
# included as an external subproject. The second is an additional
# external subproject and the last is an optional internal subproject.
#
# MCPPBS_INCLUDE_EXTERNAL([sproj-a])
# MCPPBS_INCLUDE_INTERNAL([sproj-b])
# MCPPBS_INCLUDE_INTERNAL([sproj-c*])
#
MCPPBS_INCLUDE_INTERNAL([utst])
MCPPBS_INCLUDE_INTERNAL([xcel])
MCPPBS_INCLUDE_INTERNAL([xmem])
MCPPBS_INCLUDE_INTERNAL([ex_gcd])
MCPPBS_INCLUDE_INTERNAL([ex_sort])
#-------------------------------------------------------------------------
# MCPPBS subproject libraries to install
#-------------------------------------------------------------------------
# The libraries and headers for these subprojects will be installed. The
# subprojects must have a pkg-config file named sproj/sproj.pc.in which
# is setup to allow other projects to use the installed subproject. Here
# is an example which installs the sproj-b subproject and sproj-c
# subproject (see above).
#
# MCPPBS_INSTALL_LIBS([sproj-b,sproj-c])
#
#-------------------------------------------------------------------------
# Output
#-------------------------------------------------------------------------
AC_CONFIG_FILES([Makefile])
AC_OUTPUT