1ROOT-CONFIG(1)              General Commands Manual             ROOT-CONFIG(1)
2
3
4

NAME

6       root-config - ROOT utility for your Makefiles
7

SYNOPSIS

9       root-config [options]
10

DESCRIPTION

12       root-config  is a tool that is used to configure and determine the com‐
13       piler and linker flags that should be used to compile and link programs
14       that use ROOT.
15
16              CPPFLAGS  += $(shell root-config --cflags)
17              LDLIBS    += $(shell root-config --libs)
18              LDFLAGS   += $(shell root-config --ldflags)
19
20              %Cint.cxx:Include.h LinkDef.h
21                      rootcint -f $@ -c $^
22
23       in  your  Makefile  to  use  the  built-in rules of GNU make. For GUIs,
24       replace --libs by --glibs.
25
26       You may also find the automake(1), autoconf(1),  and  libtool(1)  macro
27       file  /usr/share/aclocal/root.m4  useful.   If  that  macro  file isn't
28       installed where aclocal will find it, copy the contents to  your  local
29       acinclude.m4  file.  In the directories you use ROOT libraries, have in
30       your Makefile.am file:
31
32              lib_LTLIBRARIES         = libFoo.la
33              pkginclude_HEADERS      = Foo.h
34              noinst_HEADERS          = FooCint.h
35              libFoo_la_SOURCES       = Foo.cxx FooCint.cxx
36              libFoo_la_LDFLAGS       = -version-info 1:0 -R @ROOTLIBDIR@
37              libFoo_la_LDADD         = -lCore -lCint @ROOTAUXLIBS@
38
39              BUILT_SOURCES           = FooCint.cxx FooCint.h
40
41              AM_CPPFLAGS             = -I@ROOTINCDIR@
42              AM_LDFLAGS              = -L@ROOTLIBDIR@
43              CLEANFILES              = *Cint.cxx *Cint.h *~ core
44
45              %Cint.cxx %Cint.h:Include.h LinkDef.h
46                      @ROOTCINT@ -f $*Cint.cxx -c $(INCLUDES) $(AM_CPPFLAGS) $^
47
48       where you should substitute Foo with whatever, and list the appropriate
49       source files in the _SOURCES variable. In you configure.in file, put:
50
51              AC_PROG_CC
52              AC_PROG_CXX
53              ROOT_PATH
54              AM_PROG_LIBTOOL
55
56       along with any other macros you may need.
57
58       Note that the ROOT_PATH macro takes three optional arguments: the mini‐
59       mal ROOT version to use, action if ROOT is found, and  action  if  ROOT
60       isn't found.  Some examples are
61
62              ROOT_PATH(3.03/05, , AC_MSG_ERROR(Your ROOT version is too old))
63              ROOT_PATH(, AC_DEFUN(HAVE_ROOT))
64
65       For  example, if you want to compile some part of your source tree con‐
66       ditionally on wether ROOT is present or not, you can put in  your  con‐
67       figure.in file
68
69              ROOT_PATH(,
70              [
71                AC_DEFUN(HAVE_ROOT)
72                have_root=yes
73              ])
74              AM_CONDITIONAL(GOT_ROOT, test "x$have_root" = "xyes")
75
76       And then in some Makefile.am
77
78              EXTRA_SOURCES       = root_dependent_source.cc
79              if GOT_ROOT
80              LIBFOOXTRA              = root_dependent_source.cc
81              else
82              LIBFOOXTRA              =
83              endif
84
85              lib_LTLIBRARIES         = libFoo.la
86              libFoo_la_SOURCES   = Foo.cc  $(LIBFOOXTRA)
87
88       The full list of substitution variables are:
89
90       ROOTCONF
91              full path to root-config
92
93       ROOTEXEC
94              full path to root
95
96       ROOTCINT
97              full path to rootcint
98
99       ROOTLIBDIR
100              Where the ROOT libraries are
101
102       ROOTINCDIR
103              Where the ROOT headers are
104
105       ROOTCFLAGS
106              Extra compiler flags
107
108       ROOTLIBS
109              ROOT basic libraries
110
111       ROOTGLIBS
112              ROOT basic + GUI libraries
113
114       ROOTAUXLIBS
115              Auxiliary libraries and linker flags for ROOT
116
117       ROOTAUXCFLAGS
118              Auxiliary compiler flags
119
120       ROOTRPATH
121              Same as ROOTLIBDIR
122

OPTIONS

124       --help Give a short list of options available, and exit
125
126       --version
127              Report the version number of installed ROOT, and exit.
128
129       --prefix=<prefix>
130              If no arguments are given, reports where ROOT is installed. With
131              an argument of =<prefix>, set the base of the subsequent options
132              to  <prefix>.  If  \--exec-prefix is passed with an argument, it
133              overrides the argument given to \--prefix for the library path.
134
135       --exec-prefix=<prefix>
136              If  no  argument  is  given,  report  where  the  libraries  are
137              installed. If an argument is given, use that as the installation
138              base directory for the libraries. This option  does  not  affect
139              the include path.
140
141       --libdir
142              Print the directory where the ROOT libraries are installed.
143
144       --incdir
145              Print the directory where the ROOT headers are installed.
146
147       --libs Output  a  line  suitable for linking a program against the ROOT
148              libraries. No graphics libraries are included.
149
150       --glibs
151              As above, but also output for the graphics (GUI) libraries.
152
153       --evelibs
154              As above, but also output for the  graphics  libraries  and  Eve
155              libraries.
156
157       --cflags
158              Output  a  line suitable for compiling a source file against the
159              ROOT header (class declararion) files.
160
161       --new  Put the libNew.so library in the  library  lists.   This  option
162              must be given before options --libs and --glibs.
163
164       --nonew
165              Compatiblity option, does nothing.
166
167       --auxlibs
168              Print auxiliary libraries and/or system linker flags.
169
170       --noauxlibs
171              Do  not  print auxiliary libraries and/or system linker flags in
172              the output of --libs and --glibs.  --auxcflags  Print  auxiliary
173              compiler flags.
174
175       --noauxcflags
176              Do not print auxiliary compiler flags in the output of --cflags.
177
178       --noldflags
179              Do  not  print  library  path  link  option in output of --libs,
180              --evelibs and --glibs.
181
182       --ldflags
183              Print additional linker flags (eg. -m64)
184
185       --arch Print the architecture (compiler/OS)
186
187       --platform
188              Print the platform (OS)
189
190       --bindir
191              Print the binary directory of the root installation (location of
192              the root executable)
193
194       --etcdir
195              Print  the configuration directory (place of system.rootrc, mime
196              type, valgrind suppression files and .desktop files)
197
198       --config
199              Print arguments used for ./configure as used when building root.
200              These  cannot  be  used  for  ./configure if root was built with
201              CMake.
202
203       --git-revision
204              Print the ROOT git revision number from which root was built.
205
206       --has-<feature>
207              Test if <feature> has been enabled in the build process.
208
209       --features
210              Print list of all supported features
211
212       --ncpu Print number of available (hyperthreaded) cores
213
214       --python-version
215              Print the Python version used by ROOT
216
217       --cc   Print alternative C compiler specified when ROOT was built
218
219       --cxx  Print alternative C++ compiler specified when ROOT was built
220
221       --f77  Print alternative Fortran compiler specified when ROOT was built
222
223       --ld   Print alternative Linker specified when ROOT was built
224

SEE ALSO

226       root(1), root-cint(1)
227
228       See also the ROOT webpages: http://root.cern.ch
229

ORIGINAL AUTHORS

231       The ROOT team (see web page above):
232              Rene Brun and Fons Rademakers
233
235       This library is free software; you can redistribute it and/or modify it
236       under  the  terms of the GNU Lesser General Public License as published
237       by the Free Software Foundation; either version 2.1 of the License,  or
238       (at your option) any later version.
239
240       This  library  is  distributed  in the hope that it will be useful, but
241       WITHOUT ANY  WARRANTY;  without  even  the  implied  warranty  of  MER‐
242       CHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
243       General Public License for more details.
244
245       You should have received a  copy  of  the  GNU  Lesser  General  Public
246       License  along  with  this  library; if not, write to the Free Software
247       Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,  MA   02110-1301
248       USA
249

AUTHOR

251       This   manual   page   was   written   by  Christian  Holm  Christensen
252       <cholm@nbi.dk>, for the Debian GNU/Linux system (but  may  be  used  by
253       others).
254
255
256
257ROOT                               Version 3                    ROOT-CONFIG(1)
Impressum