Newer
Older
# A (not so) simple configure script.
#
# Authors: Christian Holm Christensen and Fons Rademakers
#
# To help with debugging the script, some comments are preprended with
# 3 '#' echo and 3 '%' - replace that pattern with echo and 3 '%' to
# get printouts. When done replace the pattern echo and 3 '%' with the
# original pattern of 3 '#' echo and 3 '%'. Emacs command M-C-% does
# this easily.
#
######################################################################
#
### echo %%% Some global variables
#
found_lib=no
found_dir=no
found_hdr=no
noact="no"
enable_afs=no
enable_asimage=yes
enable_cern=yes
enable_dcache=yes
enable_krb5=yes
enable_mysql=yes
enable_opengl=yes
enable_openiv=yes
enable_pgsql=yes
enable_pythia=yes
enable_pythia6=yes
enable_rfio=yes
enable_rpath=no
enable_sapdb=yes
enable_shadowpw=
enable_shared=yes
enable_soversion=no
enable_srp=yes
enable_thread= # must be set explicitely via --enable-thread
enable_exceptions=yes
enable_ttf=yes
enable_venus=yes
show_pkglist=no
Fons Rademakers
committed
options="enable_afs enable_cern enable_mysql enable_opengl enable_pgsql \
enable_pythia enable_pythia6 enable_rfio enable_dcache enable_rpath \
enable_sapdb enable_shadowpw enable_shared enable_soversion \
enable_srp enable_table enable_thread enable_ttf enable_venus \
enable_krb5 enable_exceptions enable_openiv enable_alien \
enable_asimage"
Fons Rademakers
committed
######################################################################
#
### echo %%% Some common functions
#
message() {
# Write a simple message to std out
if test $# -lt 1 ; then
echo "message: Too few arguments"
return 1
fi
echo $ac_n "$* ... $ac_c"
}
checking_msg() {
# Write a simple "checking" message to std out.
if test $# -lt 1 ; then
echo "checking_msg: Too few arguments"
return 1
fi
echo $ac_n "Checking for$ac_c"
while test $# -gt 1 ; do
echo $ac_n " $1,$ac_c"
shift
if test $# -eq 1 ; then
echo $ac_n " or$ac_c"
fi
done
echo $ac_n " $1 ... $ac_c"
}
check_library() {
# This function will try to locate a library [$1] in the specific
# directory [$3] or in a default path [$*]. If the second argument
# [$2] is not "no", then shared libraries are favoured.
# The result of the search is stored in found_lib and found_dir,
# which should be immediately copied, since the variables value will
# be overwritten at next invocation of this function.
# Assert that we got enough arguments
if test $# -lt 4 ; then
echo "check_library: Too few arguments"
return 1
fi
# Save arguments in local names
lib=$1 ; shift
shared=$1 ; shift
libdirl=$1 ; shift
libdirs="$*"
# Write a message
checking_msg $lib
# check if we got a specific argument as to where the library
# is to be found
if test ! "x$libdirl" = "x" ; then
libdirs=$libdirl
fi
found_lib=no
found_dir=no
# Make list of libraries to search for. The .lib extension is for
# Windoze - note $shared is always "no" on windoze, since we need
# the .lib export library to link.
libs=""
for i in $lib ; do
for ext in .a .lib ; do
libs="$libs $i$ext"
done
done
if test ! "x$shared" = "xno" ; then
slibs=""
for i in $lib ; do
Fons Rademakers
committed
for ext in .so .sl .dylib ; do
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
slibs="$slibs $i$ext"
done
done
libs="$slibs $libs"
fi
# Loop over the list of possible directories, and see if we can
# find any of the library files as determind above.
for i in $libdirs; do
for j in ${libs} ; do
# if we found the file (it's readable by user), we set the
# logical variables an be on our way, otherwise we continue
if test -r $i/$j ; then
found_dir=$i
found_lib=$j
break 2
fi
done
done
echo $found_dir
unset libs
unset slibs
unset libdirs
if test "x$found_dir" = "xno" || test "$found_lib" = "xno" ; then
found_dir=""
found_lib=""
else
flib=""
for i in $lib ; do
for ext in .a .lib ; do
if test "x$found_lib" = "x$i$ext" ; then
flib=$i$ext
fi
done
done
if test "x$shared" = "xno" || \
test "x$found_lib" = "x$flib" ; then
found_lib=${found_dir}/${found_lib}
found_dir=""
else
found_lib=`echo $found_lib | sed 's|^lib\(.*\)\..*|-l\1|'`
found_dir=-L${found_dir}
fi
fi
unset shared
unset lib
unset flib
unset libdirl
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
check_header() {
# This function will try to locate a header [$1] in the specific
# directory [$2] or in a default path [$*].
# The result of the search is stored in found_hdr and found_dir,
# which should be immediately copied, since the variables value will
# be overwritten at next invocation of this function.
# Assert that we got enough arguments
if test $# -lt 3 ; then
echo "check_header: Too few arguments"
return 1
fi
# Save arguments in logical names
hdrs=$1 ; shift
hdrdir=$1 ; shift
hdrdirs="$*"
# Write a message
checking_msg $hdrs
# Check if we got a specific argument as to where the library
# is to be found
if test ! "x$hdrdir" = "x" ; then
hdrdirs=$hdrdir
fi
found_hdr=no
found_dir=no
# Loop over the list of possible directories, and see if we can
# find any of the library files as determind above.
for i in $hdrdirs; do
for j in ${hdrs} ; do
# if we found the file (it's readable by user), we set the
# logical variables and are on our way, otherwise we continue
if test -r $i/$j ; then
found_dir=$i
found_hdr=$j
break 2
fi
done
done
echo $found_dir
if test "x$found_hdr" = "xno" || test "$found_dir" = "xno" ; then
found_hdr=""
found_dir=""
fi
# Avoid inclusion of /usr/include, which is always included anyway
if test "x$found_dir" = "x/usr/include" ; then
found_dir="include"
fi
unset hdrs
unset hdrdirs
unset hdrdir
}
###################################################################
#
### echo %%% Some skeleton and config files
#
ARCHS=config/ARCHS
MAKEIN=config/Makefile.in
MAKEOUT=config/Makefile.config
CONFIN=config/config.in
CONFOUT=include/config.h
RCONFIN=config/root-config.in
RCONFOUT=bin/root-config
Fons Rademakers
committed
ROOTRCIN=config/rootrc.in
MEMPROBEIN=config/memprobe.in
MEMPROBEOUT=bin/memprobe
MIMEUNIXIN=config/mimes.unix.in
MIMEWIN32IN=config/mimes.win32.in
MIMEOUT=etc/root.mimes
TMAKEIN=test/Makefile.in
TMAKEOUT=test/Makefile
######################################################################
#
### echo %%% Testing the echo features
#
Fons Rademakers
committed
if `(echo "testing\c"; echo 1,2,3) | grep c > /dev/null` ; then
if `(echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn > /dev/null`; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
######################################################################
#
### echo %%% Help function
#
confhelp() {
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
cat <<EOF
Usage: $0 <architecture> [flag=value]
FLAG DESCRIPTION DEFAULT
--aclocaldir Autoconf macro install dir(<prefix>/share/aclocal)
--bindir Binary installation dir (<prefix>/bin)
--build Build configuration [debug, exceptions, ...],
overrides the ROOTBUILD shell variable
--cintincdir CINT interpeted headers (<datadir>/cint)
--datadir Data installation dir (<prefix>/share/root)
--docdir Documentation (<prefix>/share/doc/root)
--etcdir Config installation dir (/etc/root)
--elispdir Where to put Emacs Lisp (<prefix>/share/emacs/site-lisp)
--iconpath Icon installation dir (<datadir>/icons)
--incdir Header installation dir (<prefix>/include/root)
--libdir Library installation dir (<prefix>/lib/root)
--macrodir Macro installation dir (<datadir>/macros)
--mandir Manpages installation dir (<prefix>/share/man/man1)
--no-create Do not create output files, dry run
--prefix Installation prefix (/usr/local)
--proofdir PROOF utils dir (<datadir>/proof)
--srcdir Sources installation dir (<datadir>/src)
--testdir Tests (<docdir>/test)
--tutdir Tutorials (<docdir>/tutorial)
enable/disable options, prefix with either --enable- or --disable-
afs AFS support, requires AFS libs and objects
alien AliEn support, requires libAliEn from ALICE
asimage Image processing support, requires libAfterImage
cern CERNLIB usage, build h2root and g2root
dcache dCache support, requires libdcap from DESY
krb5 Kerberos5 support, requires Kerberos libs
mysql MySQL support, requires libmysqlclient
opengl OpenGL support, requires libGL and libGLU
openiv OpenInventor support, requires libInventor and libInventorXt
pgsql PostgreSQL support, requires libpq
pythia Pythia5 EG support, requires libPythia
pythia6 Pythia6 EG support, requires libPythia6
rfio SHIFT support, requires libshift from CERN
rpath Set library path on executables
sapdb SapDB support, requires libsqlod and libsqlrte
shadowpw Shadow password support
shared Use shared 3rd party libraries if possible
soversion Set version number in sonames
srp SRP support, requires SRP source tree
table Build libTable contrib library
thread Thread support
ttf True Type Font support, requires libtff
venus Venus EG support, requires libVenus
with options, prefix with --with-, enables corresponding support
afs AFS support, location of AFS distribution
alien-incdir AliEn support, location of AliEn.h
alien-libdir AliEn support, location of libAliEn
asimage-incdir Image processing support, location of afterimage.h
asimage-libdir Image processing support, location of libAfterImage
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
cern-libdir HBOOK converter, location of CERNLIB libraries
dcap-incdir dCache support, location of dcap.h
dcap-libdir dCache support, location of libdcap
krb5 Kerberos5 support, location of Kerberos distribution
mysql-incdir MySQL support, location of mysql.h
mysql-libdir MySQL support, location of libmysqlclient
opengl-incdir OpenGL support, location of GL/gl.h
opengl-libdir OpenGL support, location of libGL
openiv-incdir OpenInventor support, location of Inventor/SoType.h
openiv-libdir OpenInventor support, location of libInventor
pgsql-incdir PostgreSQL support, location of libpq-fe.h
pgsql-libdir PostgreSQL support, location of libpq
pythia-libdir PYHTIA support, location of libPythia
pythia6-libdir PYHTIA6 support, location of libPythia6
sapdb-incdir SapDB support, location of sql.h
sapdb-libdir SapDB support, location of libsqlod
shift-libdir RFIO support, location of libshift
srp Secure Remote Passwd support, location of SRP distribution
srp-incdir SRP support, location header of t_server.h
srp-libdir SRP support, location header of libsrp.a
sys-iconpath Extra icon path
thread-libdir Thread support, path to libpthread
ttf-fontdir TTF support, location of TTF fonts
ttf-incdir TTF support, location of freetype.h
ttf-libdir TTF support, location of libttf
venus-libdir VENUS support, location of libVenus
xpm-libdir XPM support, path to libXpm
EOF
cat config/ARCHS
}
######################################################################
#
### echo %%% See if we got the architecture
#
if test $# -lt 1 ; then
echo "You must give architecture as first argument - try $0 --help"
exit 1
else
case $1 in
-h|--help) confhelp ; exit 0 ;;
*) arch1=$1
if test "$arch1" = "linuxegcs" ; then
arch1="linux"
fi
if `grep "^$arch1 " $ARCHS >/dev/null 2>&1` ; then
arch=$arch1
echo "Configuring for $arch"
shift
else
echo "Invalid architecture. Try $0 --help"
exit 1
fi
if test "x$arch" = "xwin32" || test "x$arch" = "xwin32gdk" ; then
platform="win32"
else
platform=$arch
fi
;;
esac
fi
######################################################################
#
### echo %%% Some clean up
#
trap "rm -f Makefile.tmp config.tmp root-config.tmp TMakefile.tmp rootrc.tmp \
memprobe.tmp; exit 1" 1 2 3 15
######################################################################
#
### echo %%% Command line arguments
#
if test $# -gt 0 ; then
while test ! "x$1" = "x" ; do
Fons Rademakers
committed
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--help|-h) confhelp ; exit 0 ;;
Fons Rademakers
committed
################################################################
#
# With options to specifiy third part software
#
--no-create) noact="yes" ;;
--with-afs=*) afsdir=$optarg ; enable_afs="yes" ;;
--with-alien-incdir=*) alienincdir=$optarg ; enable_alien="yes" ;;
--with-alien-libdir=*) alienlibdir=$optarg ; enable_alien="yes" ;;
--with-asimage-incdir=*) asimageincdir=$optarg ; enable_asimage="yes" ;;
--with-asimage-libdir=*) asimagelibdir=$optarg ; enable_asimage="yes" ;;
--with-cern-libdir=*) cernlibdir=$optarg ; enable_cern="yes" ;;
--with-dcap-incdir=*) dcapincdir=$optarg ; enable_dcache="yes" ;;
--with-dcap-libdir=*) dcaplibdir=$optarg ; enable_dcache="yes" ;;
--with-krb5=*) krb5dir=$optarg ; enable_krb5="yes" ;;
--with-mysql-incdir=*) mysqlincdir=$optarg ; enable_mysql="yes" ;;
--with-mysql-libdir=*) mysqllibdir=$optarg ; enable_mysql="yes" ;;
Fons Rademakers
committed
--with-opengl-incdir=*) openglincdir=$optarg ; enable_opengl="yes" ;;
--with-opengl-libdir=*) opengllibdir=$optarg ; enable_opengl="yes" ;;
--with-openiv-incdir=*) openivincdir=$optarg ; enable_openiv="yes" ;;
--with-openiv-libdir=*) openivlibdir=$optarg ; enable_openiv="yes" ;;
--with-pgsql-incdir=*) pgsqlincdir=$optarg ; enable_pgsql="yes" ;;
--with-pgsql-libdir=*) pgsqllibdir=$optarg ; enable_pgsql="yes" ;;
Fons Rademakers
committed
--with-pythia-libdir=*) pythialibdir=$optarg ; enable_pythia="yes" ;;
--with-pythia6-libdir=*) pythia6libdir=$optarg ; enable_pythia6="yes" ;;
--with-sapdb-incdir=*) sapdbincdir=$optarg ; enable_sapdb="yes" ;;
--with-sapdb-libdir=*) sapdblibdir=$optarg ; enable_sapdb="yes" ;;
Fons Rademakers
committed
--with-shift-libdir=*) shiftlibdir=$optarg ; enable_rfio="yes" ;;
--with-srp-incdir=*) srpincdir=$optarg ; enable_srp="yes" ;;
--with-srp-libdir=*) srplibdir=$optarg ; enable_srp="yes" ;;
--with-srp=*) srpdir=$optarg ; enable_srp="yes" ;;
Fons Rademakers
committed
--with-sys-iconpath=*) extraiconpath=$optarg ;;
--with-thread-libdir=*) threadlibdir=$optarg ; enable_thread="yes" ;;
--with-ttf-fontdir=*) ttffontdir=$optarg ; enable_ttf="yes" ;;
--with-ttf-incdir=*) ttfincdir=$optarg ; enable_ttf="yes" ;;
--with-ttf-libdir=*) ttflibdir=$optarg ; enable_ttf="yes" ;;
--with-venus-libdir=*) venuslibdir=$optarg ; enable_venus="yes" ;;
--with-xpm-libdir=*) xpmlibdir=$optarg ;;
Fons Rademakers
committed
################################################################
#
# Enable/disable to turn on/off third party software linkage and
# features
#
Fons Rademakers
committed
--enable-*)
f=`echo $1 | sed -e 's/--//' -e 's/-/_/'`
eval $f=yes
for c in $options ; do
if test "x$c" = "x$f" ; then
f=""
fi
done
if test "x$f" != "x" ; then
echo "Invalid option '$1'. Try $0 --help" ; exit 1 ;
fi
;;
--disable-*)
f=`echo $1 | sed -e 's/--disable/enable/' -e 's/-/_/'`
eval $f=no
for c in $options ; do
if test "x$c" = "x$f" ; then
f=""
fi
done
if test "x$f" != "x" ; then
echo "Invalid option '$1'. Try $0 --help" ; exit 1 ;
fi
;;
Fons Rademakers
committed
################################################################
#
# Build steering option
#
--build=*) rootbuild="ROOTBUILD := $optarg" ;;
################################################################
#
# Install path options
#
--aclocaldir=*) haveconfig=-DHAVE_CONFIG ; aclocaldir=$optarg ;;
Fons Rademakers
committed
--bindir=*) haveconfig=-DHAVE_CONFIG ; bindir=$optarg ;;
--cintincdir=*) haveconfig=-DHAVE_CONFIG ; cintincdir=$optarg ;;
--datadir=*) haveconfig=-DHAVE_CONFIG ; datadir=$optarg ;;
--docdir=*) haveconfig=-DHAVE_CONFIG ; docdir=$optarg ;;
--elispdir=*) haveconfig=-DHAVE_CONFIG ; elispdir=$optarg ;;
--etcdir=*) haveconfig=-DHAVE_CONFIG ; etcdir=$optarg ;;
Fons Rademakers
committed
--iconpath=*) haveconfig=-DHAVE_CONFIG ; iconpath=$optarg ;;
--incdir=*) haveconfig=-DHAVE_CONFIG ; incdir=$optarg ;;
--libdir=*) haveconfig=-DHAVE_CONFIG ; libdir=$optarg ;;
--macrodir=*) haveconfig=-DHAVE_CONFIG ; macrodir=$optarg ;;
--mandir=*) haveconfig=-DHAVE_CONFIG ; mandir=$optarg ;;
--pkglist*) show_pkglist="yes" ; noact="yes";;
--prefix*) haveconfig=-DHAVE_CONFIG ; prefix=$optarg ;;
Fons Rademakers
committed
--srcdir=*) haveconfig=-DHAVE_CONFIG ; srcdir=$optarg ;;
--testdir=*) haveconfig=-DHAVE_CONFIG ; testdir=$optarg ;;
--tutdir=*) haveconfig=-DHAVE_CONFIG ; tutdir=$optarg ;;
*) echo "Invalid option '$1'. Try $0 --help" ; exit 1 ;;
Fons Rademakers
committed
esac
shift
done
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% Copy skeletons to temporary files
#
if test "x$noact" = "xno"; then
cp -f $MAKEIN Makefile.tmp
cp -f $CONFIN config.tmp
cp -f $RCONFIN root-config.tmp
cp -f $TMAKEIN TMakefile.tmp
cp -f $ROOTRCIN rootrc.tmp
cp -f $MEMPROBEIN memprobe.tmp
fi
######################################################################
#
### echo %%% Should sonames contain version numbers
Fons Rademakers
committed
#
if test "x$enable_soversion" = "xyes"; then
major=`sed 's|\(.*\)\..*/.*|\1|' < build/version_number`
minor=`sed 's|.*\.\(.*\)/.*|\1|' < build/version_number`
revis=`sed 's|.*\..*/\(.*\)|\1|' < build/version_number`
mkliboption="-v $major $minor $revis "
unset major
unset minor
unset revis
Fons Rademakers
committed
######################################################################
#
### echo %%% On Windoze always set enable_shared to no; need .lib
#
if test "x$platform" = "xwin32"; then
enable_shared="no"
fi
######################################################################
#
### echo %%% XPM Library - Mandatory lib on Unix
Fons Rademakers
committed
#
# Mandetory test, must succeed
# Check for Xpm library
#
if test ! "$platform" = "win32"; then
check_library "libXpm" "$enable_shared" "$xpmlibdir" \
$XPM $XPM/lib /usr/lib /usr/local/lib /usr/lib/X11 \
/usr/local/lib/X11 /usr/X11R6/lib /use/local/X11R6/lib \
/usr/X11/lib
xpmlib=$found_lib
xpmlibdir=$found_dir
Fons Rademakers
committed
if test "x$xpmlib" = "x" ; then
echo "`basename $0`: libXpm MUST be installed"
Fons Rademakers
committed
exit 1
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% Exceptions - compiler feature
#
if test "x$EXCEPTIONS" = "xno" ; then
enable_exceptions=no
fi
e=`echo $rootbuild | sed 's/.*exceptions.*/1/'`
if test "x$e" = "x1" ; then
enable_exceptions=no
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% Posix Thread Library
Fons Rademakers
committed
#
# Check for posix thread library
#
case $platform in
linux|linuxdeb|linuxicc|linuxecc)
if test "x$enable_thread" = "x"; then
enable_thread="yes"
fi
;;
esac
if test "x$enable_thread" = "xyes" && test ! "$platform" = "win32" ; then
check_library "libpthread" "$enable_shared" "$threadlibdir" \
$THREAD $THREAD/lib /usr/lib32 /usr/lib /usr/local/lib /usr/lib/X11 \
/usr/local/lib/X11 /usr/X11R6/lib /usr/local/X11R6/lib \
/usr/X11/lib /usr/shlib
threadlib=$found_lib
threadlibdir=$found_dir
if test "x$threadlib" = "x" ; then
Fons Rademakers
committed
enable_thread="no"
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% FreeType Support - Third party libraries
Fons Rademakers
committed
#
# (see freetype.org)
#
if test ! "x$enable_ttf" = "xno" && test ! "$platform" = "win32"; then
Fons Rademakers
committed
# Check for FreeType TTF include, library and fonts
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
check_header "freetype.h" "$ttfincdir" $TTF $TTF/include \
/usr/include /usr/local/include /usr/include/freetype \
/usr/local/include/freetype /usr/freetype/include \
/usr/local/freetype/include /usr/freetype \
/usr/local/freetype /opt/freetype /opt/freetype/include \
/usr/local/ttf/include /opt/ttf/include \
/usr/include/freetype1/freetype
ttfinc=$found_hdr
ttfincdir=$found_dir
check_library "libttf" "$enable_shared" "$ttflibdir" \
$TTF $TTF/lib /usr/lib /usr/local/lib /usr/lib/freetype \
/usr/local/lib/freetype /usr/freetype/lib \
/usr/local/freetype/lib /usr/freetype \
/usr/local/freetype /opt/freetype /opt/freetype/lib \
/usr/local/ttf/lib /opt/ttf/lib
ttflib=$found_lib
ttflibdir=$found_dir
check_header "arial.ttf" "$ttffontdir" $TTF $TTF/fonts /usr/lib/X11/fonts \
/usr/lib/X11/fonts/ttf /usr/share /usr/share/fonts \
/usr/share/fonts/ttf /usr/share/ttf /usr/local/share \
/usr/local/share/fonts /usr/local/share/fonts/ttf \
/usr/local/share/ttf /opt/fonts /opt/fonts/ttf \
/opt/ttf /opt/ttf/fonts /usr/local/ttf/fonts \
/usr/X11R6/lib/X11/fonts/truetype /usr/X11R6/lib/X11/fonts/TrueType
ttffontdir=$found_dir
Fons Rademakers
committed
# Give up if none of the above found
# Note that we no longer require the actual fonts at compile time
# since they are strictlu not needed until run time; as long
# as the freetype library and headers are present we can compile
# libGX11TTF.so. Hence, individuals that do not particular want
# the Microsoft fonts (for whatever reason) can still build the
# library.
if test "x$ttflib" = "x" || test "x$ttfincdir" = "x" ; then
enable_ttf="no"
Fons Rademakers
committed
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% OpenGL Support - Third party libraries
Fons Rademakers
committed
#
# (see mesa3d.org)
Fons Rademakers
committed
#
if test ! "x$enable_opengl" = "xno" && test ! "$platform" = "win32" ; then
# Check for OpenGL compatible include and library
check_header "GL/gl.h" "$openglincdir" $OPENGL $OPENGL/include \
/usr/include /usr/include/X11 /usr/X11/include \
/usr/X11R6/include /usr/local/include/X11 \
/usr/local/X11R6/include /usr/local/include \
/usr/include/Mesa /usr/local/include/Mesa /usr/Mesa/include \
/usr/local/Mesa/include /usr/Mesa /usr/local/Mesa /opt/Mesa \
/opt/Mesa/include /opt/graphics/OpenGL/include
openglinc=$found_hdr
openglincdir=$found_dir
opengllibdirs="$OPENGL $OPENGL/lib /usr/lib /usr/local/lib /usr/lib/X11 \
/usr/X11R6/lib /usr/local/lib/X11 /usr/local/X11R6/lib \
/usr/X11/lib /usr/lib/Mesa /usr/local/lib/Mesa /usr/Mesa/lib \
/usr/local/Mesa/lib /usr/Mesa /usr/local/Mesa /opt/Mesa \
/opt/Mesa/lib /opt/graphics/OpenGL/lib/hpux64 /opt/graphics/OpenGL/lib"
keep=$opengllibdir
check_library "libGL libMesaGL" "$enable_shared" \
"$opengllibdir" $opengllibdirs
opengllib=$found_lib
opengllibdir=$found_dir
check_library "libGLU libMesaGLU" "$enable_shared" \
"$keep" $opengllibdirs
openglulib=$found_lib
openglulibdir=$found_dir
if test "x$openglincdir" = "x" || \
test "x$opengllib" = "x" || \
test "x$openglulib" = "x" ; then
Fons Rademakers
committed
enable_opengl="no"
fi
Fons Rademakers
committed
fi
######################################################################
#
### echo %%% OpenInventor Support - Third party libraries
#
# (see http://oss.sgi.com/projects/inventor/)
#
if test "x$enable_opengl" = "xno" ; then
enable_openiv="no"
fi
if test ! "x$enable_openiv" = "xno" && test ! "$platform" = "win32" ; then
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
# Check for OpenInventor compatible include and library
check_header "Inventor/SoType.h" "$openivincdir" $IVROOT $IVROOT/include \
$IVROOT/usr/include /usr/include /usr/include/X11 /usr/X11/include \
/usr/X11R6/include /usr/local/include/X11 \
/usr/local/X11R6/include /usr/local/include \
/usr/include/inventor /usr/local/include/inventor \
/usr/inventor/include /usr/local/inventor/include \
/usr/inventor/usr/include /usr/local/inventor/usr/include \
/usr/local/inventor /opt/inventor /opt/inventor/include \
/opt/inventor/usr/include
openivinc=$found_hdr
openivincdir=$found_dir
openivlibdirs="$IVROOT $IVROOT/lib $IVROOT/usr/lib /usr/lib /usr/local/lib \
/usr/lib/X11 /usr/X11R6/lib /usr/local/lib/X11 /usr/local/X11R6/lib \
/usr/X11/lib /usr/lib/inventor /usr/local/lib/inventor \
/usr/inventor/lib /usr/inventor/usr/lib /usr/local/inventor/lib \
/usr/local/inventor/usr/lib /usr/inventor /usr/local/inventor \
/opt/inventor /opt/inventor/lib /opt/inventor/usr/lib"
keep=$openivlibdir
check_library "libInventor" "$enable_shared" \
"$openivlibdir" $openivlibdirs
openivlib=$found_lib
openivlibdir=$found_dir
check_library "libInventorXt" "$enable_shared" \
"$keep" $openivlibdirs
openivlib="$openivlib $found_lib"
openivlibdir="$openivlibdir $found_dir"
if test "x$openivincdir" = "x" || \
test "x$openivlib" = "x" ; then
enable_openiv="no"
fi
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% OpenGL support on Windoze
Fons Rademakers
committed
#
# On win32 we always have OpenGL available (is this true?)
#
if test "$platform" = "win32"; then
enable_opengl="yes"
openglincdir="include"
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% MySQL Support - Third party libraries
Fons Rademakers
committed
#
# (See mysql.org)
#
# If the user has set the flags "--disable-mysql", we don't check for
Fons Rademakers
committed
#
if test ! "x$enable_mysql" = "xno"; then
Fons Rademakers
committed
# Check for MySQL include and library
check_header "mysql.h" "$mysqlincdir" \
$MYSQL $MYSQL/include /usr/include /usr/local/include \
/usr/include/mysql /usr/local/include/mysql \
/usr/mysql/include /usr/local/mysql/include /usr/mysql \
/usr/local/mysql /opt/mysql /opt/mysql/include
mysqlinc=$found_hdr
mysqlincdir=$found_dir
check_library "libmysqlclient" "$enable_shared" "$mysqllibdir" \
$MYSQL $MYSQL/lib /usr/lib /usr/local/lib /usr/lib/mysql \
/usr/local/lib/mysql /usr/mysql/lib /usr/local/mysql/lib \
/usr/mysql /usr/local/mysql /opt/mysql /opt/mysql/lib
mysqllib=$found_lib
mysqllibdir=$found_dir
# on linux, but maybe also other systems, explicitely add libz
# (formally only needed when linking against the static libmysqlclient.a)
if test ! "x$mysqllib" = "x" ; then
case $arch in
linux*) mysqllib="$mysqllib -lz" ;;
esac
fi
if test "x$mysqlincdir" = "x" || test "x$mysqllib" = "x"; then
Fons Rademakers
committed
enable_mysql="no"
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% PostgreSQL Support - Third party libraries
#
# (See postgresql.org)
#
# If the user has set the flags "--disable-pgsql", we don't check for
if test ! "x$enable_pgsql" = "xno"; then
# Check for PgSQL include and library
check_header "libpq-fe.h" "$pgsqlincdir" $PGSQL $PGSQL/include \
/usr/include /usr/local/include /usr/local/pgsql/include \
/usr/include/pgsql /usr/include/postgresql /usr/pgsql/include \
/usr/local/include/pgsql /usr/local/include/postgresql \
/usr/pgsql /usr/local/pgsql /opt/pgsql /opt/pgsql/include
pgsqlinc=$found_hdr
pgsqlincdir=$found_dir
check_library "libpq" "$enable_shared" "$pgsqllibdir" \
$PGSQL $PGSQL/lib /usr/local/pgsql/lib /usr/local/lib \
/usr/lib/pgsql /usr/local/lib/pgsql /usr/pgsql/lib /usr/lib \
/usr/pgsql /usr/local/pgsql /opt/pgsql /opt/pgsql/lib
pgsqllib=$found_lib
pgsqllibdir=$found_dir
if test "x$pgsqlincdir" = "x" || test "x$pgsqllib" = "x"; then
enable_pgsql="no"
fi
fi
######################################################################
#
### echo %%% SapDB Support - Third party libraries
#
# (See www.sapdb.org)
#
# If the user has set the flags "--disable-sapdb", we don't check for
# SapDB at all.
#
if test ! "x$enable_sapdb" = "xno"; then
check_header "sql.h" "$sapdbincdir" $SAPDB $SAPDB/include \
/opt/sapdb/interfaces/odbc/incl /usr/sapdb/interfaces/odbc/incl \
/usr/sapdb/include /usr/local/sapdb/interfaces/odbc/incl \
/usr/sapdb/web/incl /usr/include/sapdb /usr/local/include/sapdb \
/usr/local/sapdb/include /usr/local/sapdb/web/incl /usr/sapdb \
/usr/local/sapdb /opt/sapdb /opt/sapdb/include /opt/sapdb/web/incl
sapdbinc=$found_hdr
sapdbincdir=$found_dir
check_library "libsqlod" "$enable_shared" "$sapdblibdir" \
$SAPDB $SAPDB/lib /opt/sapdb/interfaces/odbc/lib \
/usr/sapdb/interfaces/odbc/lib /usr/spadb/lib \
/usr/local/sapdb/interfaces/odbc/lib /usr/local/sapdb/lib \
/usr/lib/sapdb /usr/local/lib/sapdb /usr/sapdb/lib \
/usr/local/sapdb/lib /usr/sapdb /usr/local/sapdb \
/opt/sapdb /opt/sapdb/lib /usr/sapdb/web/lib \
/usr/local/sapdb/web/lib /opt/sapdb/web/lib
sapdblib=$found_lib
sapdblibdir=$found_dir
if test "x$sapdbincdir" = "x" || test "x$sapdblib" = "x"; then
Fons Rademakers
committed
######################################################################
#
### echo %%% SHIFT Support - Third party libraries
#
# (See http://www.cern.ch)
#
# Check for libshift.a
#
if test ! "x$enable_rfio" = "xno" ; then
check_library "libshift shift" "$enable_shared" "$shiftlibdir" \
$RFIO $RFIO/lib /cern/pro/lib /cern/new/lib /cern/old/lib \
/opt/shift/lib /usr/local/shift/lib /usr/lib/shift \
/usr/local/lib/shift /usr/lib /usr/local/lib
shiftlib=$found_lib
shiftlibdir=$found_dir
if test "x$shiftlib" = "x"; then
enable_rfio="no"
else
case $platform in
linux*) shiftlib="$shiftlib -lnsl" ;;
solarisCC5) shiftlib="$shiftlib -lposix4" ;;
Fons Rademakers
committed
esac
fi
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% CERNLIB Usage - Third party libraries
Fons Rademakers
committed
#
# (See http://www.cern.ch)
#
Fons Rademakers
committed
# Check for CERN libs (libpacklib and libkernlib)
Fons Rademakers
committed
#
if test ! "x$enable_cern" = "xno"; then
cernlibdirs="$CERNLIB $CERNLIB/lib ${CERN}/${CERN_LEVEL}/lib \
/cern/pro/lib /cern/new/lib /cern/old/lib /opt/cern/pro/lib \
/opt/cern/new/lib /opt/cern/old/lib /usr/local/cern/pro/lib \
/usr/local/cern/new/lib /usr/local/cern/old/lib /usr/lib \
/usr/lib/cern /usr/local/lib /usr/local/lib/cern"
check_library "libpacklib packlib" "$enable_shared" "${cernlibdir}" \
$cernlibdirs
packlib=$found_lib
packlibdir=$found_dir
check_library "libkernlib kernlib" "$enable_shared" "${cernlibdir}" \
$cernlibdirs
kernlib=$found_lib
kernlibdir=$found_dir
if test ! "x$packlib" = "x" && test "x$enable_rfio" = "xno" ; then
Fons Rademakers
committed
# check if libpacklib contains rfio code (case of < 2002 version)
rfio_in_pack=`nm $packlib | grep rfio_connect > /dev/null 2>&1`
if [ $? -ne 0 ]; then
echo "### Need libshift with this version of $packlib"
echo "### Run configure with --enable-rfio or set --with-shift-libdir"
packlib=""
fi
fi
if test "x$packlib" = "x" || test "x$kernlib" = "x"; then
Fons Rademakers
committed
enable_cern="no"
else
cernlib="$packlib $kernlib"
cernlibdir="$packlibdir $kernlibdir"
Fons Rademakers
committed
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% Pythia5 Usage - Third party libraries
Fons Rademakers
committed
#
# (See http://root.cern.ch and Lund)
#
Fons Rademakers
committed
# Check for libPythia
Fons Rademakers
committed
#
if test ! "x$enable_pythia" = "xno"; then
check_library "libPythia" "$enable_shared" "$pythialibdir" \
$PYTHIA $PYTHIA/lib /cern/pro/lib /opt/pythia /opt/pythia5 \
/usr/lib/pythia /usr/local/lib/pythia /usr/lib/pythia5 \
/usr/local/lib/pythia5 /usr/lib /usr/local/lib
pythialib=$found_lib
pythialibdir=$found_dir
Fons Rademakers
committed
if test "x$pythialib" = "x"; then
Fons Rademakers
committed
enable_pythia=no
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% Pythia6 Usage - Third party libraries
Fons Rademakers
committed
#
# (See http://root.cern.ch and Lund)
#
Fons Rademakers
committed
# Check for libPythia6
Fons Rademakers
committed
#
if test ! "x$enable_pythia6" = "xno" ; then
check_library "libPythia6" "$enable_shared" "$pythia6libdir" \
$PYTHIA6 $PYTHIA6/lib /cern/pro/lib /opt/pythia /opt/pythia6 \
/usr/lib/pythia /usr/local/lib/pythia /usr/lib/pythia6 \
/usr/local/lib/pythia6 /usr/lib /usr/local/lib
pythia6lib=$found_lib
pythia6libdir=$found_dir
Fons Rademakers
committed
if test "x$pythia6lib" = "x" ; then
Fons Rademakers
committed
enable_pythia6=no
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
### echo %%% Venus Usage - Third party libraries
Fons Rademakers
committed
#
# (See http://root.cern.ch)
#
Fons Rademakers
committed
# Check for libVenus
Fons Rademakers
committed
#
if test ! "x$enable_venus" = "xno" ; then
check_library "libVenus" "$enable_shared" "$venuslibdir" \
$VENUS $VENUS/lib /cern/pro/lib /opt/venus /usr/lib/venus \
/usr/local/lib/venus /usr/lib /usr/local/lib
venuslib=$found_lib
venuslibdir=$found_dir
Fons Rademakers
committed
if test "x$venuslib" = "x" ; then
Fons Rademakers
committed
enable_venus=no
fi
Fons Rademakers
committed
fi
######################################################################
#
### echo %%% dCache Support - Third party libraries
#