swh:1:snp:af87cd67498ef4fe47c76ed3e7caffe5b61facaf
Raw File
Tip revision: a4a30f9d00f1400ef5e8ff51a2d06d1644b72759 authored by Axel Naumann on 14 June 2020, 15:51:48 UTC
"Update ROOT version files to v6.22/00."
Tip revision: a4a30f9
root-config.1
.\"
.\" $Id: root-config.1,v 1.4 2005/03/21 21:42:21 rdm Exp $
.\"
.TH ROOT-CONFIG 1 "Version 3" "ROOT"
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
.\" other params are allowed: see man(7), man(1)
.SH NAME
root-config \- ROOT utility for your Makefiles
.SH SYNOPSIS
.B root-config
.I "[options]"
.SH "DESCRIPTION"
\fIroot-config\fP is a tool that is used to configure and determine
the compiler and linker flags that should be used to compile
and link programs that use \fIROOT\fP.
.RS 
.nf 

CPPFLAGS  += $(shell root-config \-\-cflags)
LDLIBS    += $(shell root-config \-\-libs)
LDFLAGS   += $(shell root-config \-\-ldflags)

%Cint.cxx:Include.h LinkDef.h
        rootcint \-f $@ \-c $^ 

.fi
.RE
in your Makefile to use the built-in rules of GNU make. For GUIs, replace \fI\-\-libs\fR by \fI\-\-glibs\fR.
.PP
You may also find the \fIautomake\fR(1), \fIautoconf\fR(1), and
\fIlibtool\fR(1) macro file \fI/usr/share/aclocal/root.m4\fR
useful.  If that macro file isn't installed where \fIaclocal\fR will
find it, copy the contents to your local \fIacinclude.m4\fR file.  In
the directories you use \fBROOT\fR libraries, have in your
\fIMakefile.am\fR file: 
.RS 
.nf 

lib_LTLIBRARIES         = libFoo.la
pkginclude_HEADERS      = Foo.h
noinst_HEADERS          = FooCint.h
libFoo_la_SOURCES       = Foo.cxx FooCint.cxx   
libFoo_la_LDFLAGS       = \-version-info 1:0 \-R @ROOTLIBDIR@
libFoo_la_LDADD         = \-lCore \-lCint @ROOTAUXLIBS@

BUILT_SOURCES           = FooCint.cxx FooCint.h 

AM_CPPFLAGS             = \-I@ROOTINCDIR@
AM_LDFLAGS              = \-L@ROOTLIBDIR@
CLEANFILES              = *Cint.cxx *Cint.h *~ core 

%Cint.cxx %Cint.h:Include.h LinkDef.h
        @ROOTCINT@ \-f $*Cint.cxx -c $(INCLUDES) $(AM_CPPFLAGS) $^  

.fi
.RE
where you should substitute \fBFoo\fR with whatever, and list the
appropriate source files in the \fB_SOURCES\fR variable. In you
\ficonfigure.in\fR file, put:
.RS
.nf

AC_PROG_CC
AC_PROG_CXX
ROOT_PATH
AM_PROG_LIBTOOL

.fi
.RE
along with any other macros you may need. 
.PP
Note that the \fBROOT_PATH\fR macro takes three optional arguments:
the minimal \fBROOT\fR version to use, action if \fBROOT\fR is found,
and action if \fBROOT\fR isn't found.  Some examples are 
.RS
.nf

ROOT_PATH(3.03/05, , AC_MSG_ERROR(Your ROOT version is too old))
ROOT_PATH(, AC_DEFUN(HAVE_ROOT))

.fi
.RE
For example, if you want to compile some part of your source tree
conditionally on wether \fBROOT\fR is present or not, you can put in
your \fIconfigure.in\fR file 
.RS
.nf

ROOT_PATH(,
[
  AC_DEFUN(HAVE_ROOT)
  have_root=yes  
])
AM_CONDITIONAL(GOT_ROOT, test "x$have_root" = "xyes")

.fi
.RE
And then in some \fIMakefile.am\fR
.RS
.nf

EXTRA_SOURCES		= root_dependent_source.cc
if GOT_ROOT
LIBFOOXTRA              = root_dependent_source.cc
else
LIBFOOXTRA              =
endif

lib_LTLIBRARIES         = libFoo.la
libFoo_la_SOURCES	= Foo.cc  $(LIBFOOXTRA)

.fi
.RE
The full list of substitution variables are:
.TP
.B ROOTCONF
full path to \fIroot-config\fR
.TP
.B ROOTEXEC
full path to \fIroot\fR
.TP
.B ROOTCINT
full path to \fIrootcint\fR
.TP
.B ROOTLIBDIR
Where the \fBROOT\fR libraries are 
.TP
.B ROOTINCDIR
Where the \fBROOT\fR headers are 
.TP
.B ROOTCFLAGS
Extra compiler flags
.TP
.B ROOTLIBS
\fBROOT\fR basic libraries 
.TP
.B ROOTGLIBS
\fBROOT\fR basic + GUI libraries
.TP
.B ROOTAUXLIBS
Auxiliary libraries and linker flags for \fBROOT\fR
.TP
.B ROOTAUXCFLAGS
Auxiliary compiler flags 
.TP
.B ROOTRPATH
Same as \fBROOTLIBDIR\fR
.SH OPTIONS 
.TP 
.B \-\-help
Give a short list of options available, and exit
.TP
.B \-\-version 
Report the version number of installed \fBROOT\fR, and exit. 
.TP
.BI \-\-prefix =<prefix>
If no arguments are given, reports where \fBROOT\fR is installed. With
an argument of =\fI<prefix>\fR, set the base of the subsequent options
to \fI<prefix>\fR. If \fB\\-\-exec-prefix\fR is passed with an argument,
it overrides the argument given to \fB\\-\-prefix\fR for the
library path. 
.TP
.BI \-\-exec-prefix =<prefix>
If no argument is given, report where the libraries are installed. If
an argument is given, use that as the installation base directory for
the libraries. This option does not affect the include path. 
.TP
.B \-\-libdir
Print the directory where the ROOT libraries are installed. 
.TP
.B \-\-incdir
Print the directory where the ROOT headers are installed. 
.TP
.B \-\-libs
Output a line suitable for linking a program against the \fBROOT\fR
libraries. No graphics libraries are included. 
.TP
.B \-\-glibs
As above, but also output for the graphics (GUI) libraries. 
.TP
.B \-\-evelibs
As above, but also output for the graphics libraries and Eve libraries.
.TP
.B \-\-cflags
Output a line suitable for compiling a source file against the
\fBROOT\fR header (class declararion) files.
.TP
.B \-\-new 
Put the \fBlibNew.so\fR library in the library lists.  This option
\fImust\fR be given before options \fB\-\-libs\fR and \fB\-\-glibs\fR. 
.TP
.B \-\-nonew 
Compatiblity option, does nothing. 
.TP
.B \-\-auxlibs
Print auxiliary libraries and/or system linker flags.
.TP
.B \-\-noauxlibs
Do not print auxiliary libraries and/or system linker flags in the
output of \fB\-\-libs\fR and \fB\-\-glibs\fR. 
.B \-\-auxcflags
Print auxiliary compiler flags.
.TP
.B \-\-noauxcflags
Do not print auxiliary compiler flags in the output of
\fB\-\-cflags\fR.
.TP
.B \-\-noldflags
Do not print library path link option in output of \fB\-\-libs\fR, \fB\-\-evelibs\fR and
\fB\-\-glibs\fR. 
.TP
.B \-\-ldflags
Print additional linker flags (eg. \fB\-m64\fR)
.TP
.B \-\-arch
Print the architecture (compiler/OS)
.TP
.B \-\-platform
Print the platform (OS)
.TP
.B \-\-bindir
Print the binary directory of the root installation (location of the root executable)
.TP
.B \-\-etcdir
Print the configuration directory (place of system.rootrc, mime type, valgrind suppression files and .desktop files)
.TP
.B \-\-config
Print arguments used for ./configure as used when building root. These cannot be used for ./configure if root was built with CMake.
.TP
.B \-\-git-revision
Print the ROOT git revision number from which root was built.
.TP
.B \-\-has-<feature>
Test if <feature> has been enabled in the build process.
.TP
.B \-\-features
Print list of all supported features
.TP
.B \-\-ncpu
Print number of available (hyperthreaded) cores
.TP
.B \-\-python-version
Print the Python version used by ROOT
.TP
.B \-\-cc
Print alternative C compiler specified when ROOT was built
.TP
.B \-\-cxx
Print alternative C++ compiler specified when ROOT was built
.TP
.B \-\-f77
Print alternative Fortran compiler specified when ROOT was built
.TP
.B \-\-ld
Print alternative Linker specified when ROOT was built
.SH "SEE ALSO"
\fIroot\fR(1), \fIroot-cint\fR(1)
.PP
See also the \fBROOT\fR webpages:
.UR http://root.cern.ch
\fIhttp://root.cern.ch\fR
.UE
.SH "ORIGINAL AUTHORS"
The ROOT team (see web page above):
.RS
\fBRene Brun\fR and \fBFons Rademakers\fR
.RE
.SH "COPYRIGHT"
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
.P
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
.P
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
.SH AUTHOR 
This manual page was written by Christian Holm Christensen
<cholm@nbi.dk>, for the Debian GNU/Linux system (but may be used by
others). 
.\"
.\" EOF
.\"
back to top