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

OPTIONS

121       --help Gives a short list of options avaliable, and exit
122
123       --version
124              Report the version number of installed ROOT, and exit.
125
126       --prefix=<prefix>
127              If no arguments is given, reports where ROOT is installed.  With
128              an argument of =<prefix>, set the base of the subsequent options
129              to <prefix>. If \--exec-prefix is passedwith an  argument,  that
130              argument  overrides  the  argument  given  to  \--prefix for the
131              library path.
132
133       --exec-prefix=<prefix>
134              If  no  argument  is  given,  report  where  the  libraries  are
135              installed. If an argument is given, use that as the installation
136              base directory for the libraries. This option  does  not  affect
137              the include path.
138
139       --libdir
140              Print the directory where the ROOT libraries are installed.
141
142       --incdir
143              Print the directory where the ROOT headers are installed.
144
145       --libs Output  a  line  suitable  for linking a program agains the ROOT
146              libraries. No graphics libraries are output.
147
148       --glibs
149              As above, but also output for the graphics libraries.
150
151       --cflags
152              Output a line suitable for compiling a source  file  againd  the
153              ROOT header (class declararion) files.
154
155       --new  Put  the  libNew.so  library  in the library lists.  This option
156              must be given before options --libs and --glibs.
157
158       --nonew
159              Compatiblity option. Does nothing.
160
161       --auxlibs
162              Print auxiliary libraries and/or system linker flags.
163
164       --noauxlibs
165              Do not print auxiliary libraries and/or system linker  flags  in
166              the  output  of --libs and --glibs.  --auxcflags Print auxiliary
167              compiler flags.
168
169       --noauxcflags
170              Do not print auxiliary compiler flags in the output of --cflags.
171
172       --noldflags
173              Do not print library path link option in output  of  --libs  and
174              --glibs.
175

SEE ALSO

177       root(1), root-cint(1)
178
179       See also the ROOT webpages: http://root.cern.ch
180

ORIGINAL AUTHORS

182       The ROOT team (see web page above):
183              Rene Brun and Fons Rademakers
184
186       This library is free software; you can redistribute it and/or modify it
187       under the terms of the GNU Lesser General Public License  as  published
188       by  the Free Software Foundation; either version 2.1 of the License, or
189       (at your option) any later version.
190
191       This library is distributed in the hope that it  will  be  useful,  but
192       WITHOUT  ANY  WARRANTY;  without  even  the  implied  warranty  of MER‐
193       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU  Lesser
194       General Public License for more details.
195
196       You  should  have  received  a  copy  of  the GNU Lesser General Public
197       License along with this library; if not, write  to  the  Free  Software
198       Foundation,  Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301
199       USA
200

AUTHOR

202       This  manual  page  was   written   by   Christian   Holm   Christensen
203       <cholm@nbi.dk>,  for  the  Debian  GNU/Linux system (but may be used by
204       others).
205
206
207
208ROOT                               Version 3                    ROOT-CONFIG(1)
Impressum