Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Koch
dune-common
Commits
190d494e
Commit
190d494e
authored
15 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
The section on config.h copied here from the grid howto. And fix a few mistakes while I'm here
[[Imported from SVN: r5557]]
parent
f86f4fcf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/buildsystem/buildsystem.tex
+30
-7
30 additions, 7 deletions
doc/buildsystem/buildsystem.tex
with
30 additions
and
7 deletions
doc/buildsystem/buildsystem.tex
+
30
−
7
View file @
190d494e
...
...
@@ -696,7 +696,7 @@ the web page. This conversion can be done using inkscape
\label
{
configure.ac
}
\configureac
is a normal text file that contains several
\autoconf
macros. These macros are evaluated
m
y the
\texttt
{
m
4
}
macro processor
macros. These macros are evaluated
b
y the
\texttt
{
m
4
}
macro processor
and transformed into a shell script.
\begin
{
lst
}
[
File dune
-
common
/
configure.ac
]
\mbox
{}
...
...
@@ -732,7 +732,7 @@ We offer a set of macros that can be used in your \configureac:
\texttt
{
DUNE
\_
CHECK
\_
ALL
}
.
\end
{
itemize
}
\texttt
{
DUNE
\_
CHECK
\_
ALL
}
and
\texttt
{
DUNE
\_
CHECK
\_
ALL
\_
M
}
define certain
\texttt
{
DUNE
\_
CHECK
\_
ALL
}
define
s
certain
variables that can be used in the
\configure
script or in the
\makefileam
:
...
...
@@ -743,21 +743,44 @@ variables that can be used in the \configure script or in the
\item
\texttt
{
DUNE
\textit
{
\,
MODULE
\,
}
ROOT
}
\end
{
itemize
}
The last step to a complete
\configureac
is that you tell autoconf
which files should be generated by
\configure
. Therefor you add an
The last step to a complete
\configureac
is that you tell
\
autoconf
which files should be generated by
\configure
. Therefor
e
you add an
\texttt
{
AC
\_
CONFIG
\_
FILES
([
\textit
{
WhiteSpaceSeparatedListOfFiles
}
])
}
statement to your
\configureac
. The list of files should be the list
of files that are to be generated, not the input
--
i.e. you would
of files that are to be generated, not the input
--
-
i.e. you would
write
\begin
{
lstlisting
}
[
language
=
make
]
AC
_
CONFIG
_
FILES
([
Makefile doc
/
Makefile
])
\end
{
lstlisting
}
end not
instead of
\begin
{
lstlisting
}
[
language
=
make
]
AC
_
CONFIG
_
FILES
([
Makefile.in doc
/
Makefile.in
])
\end
{
lstlisting
}
After you told
\autoconf
which files to create you have to actually
trigger their creation with command
\texttt
{
AC
\_
OUTPUT
}
trigger their creation with command
\texttt
{
AC
\_
OUTPUT
}
.
\subsection
{
Using configuration information provided by configure
}
The
\lstinline
!
.
/
configure
!
script in the module produces a file
\lstinline
!
config.h
!
\
that contains information about the configuration
parameters, for example which of the optional grid implementations is
available and which dimension has been selected
(
if applicable
)
. This
information can then be used at compile
-
time to include header files
or code that depend on optional packages.
As an example, the macro
\lstinline
!
HAVE
_
UG
!
\
can be used to compile
UG
-
specific code as in
\begin
{
lstlisting
}
[
basicstyle
=
\ttfamily\scriptsize
]
#if HAVE
_
UG
#include"dune
/
grid
/
uggrid.hh"
#endif
\end
{
lstlisting
}
It is important that the file
\lstinline
!
config.h
!
is the first
include file in your application
!
\subsection
{
dune
-
autogen
}
\label
{
autogen
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment