Newer
Older
#! /bin/sh
# Simple configure script.
#
# Authors: Christian Holm Christensen and Fons Rademakers
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
TMAKEIN=test/Makefile.in
TMAKEOUT=test/Makefile
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
confhelp() {
echo "Usage: $0 <architecture> [flag=value] "
echo ""
Fons Rademakers
committed
echo " FLAG DESCRIPTION DEFAULT"
echo " --prefix Installation prefix (/usr/local)"
echo " --bindir Binary installation dir (<prefix>/bin)"
echo " --libdir Library installation dir (<prefix>/lib/root)"
echo " --incdir Header installation dir (<prefix>/include/root)"
echo " --mandir Manpages installation dir (<prefix>/share/man/man1)"
echo " --etcdir Config installation dir (/etc/root)"
echo " --datadir Data installation dir (<prefix>/share/root)"
echo " --proofdir PROOF utils dir (<datadir>/proof)"
echo " --macrodir Macro installation dir (<datadir>/macros)"
echo " --cintincdir CINT interpeted headers (<datadir>/cint)"
echo " --iconpath Icon installation dir (<datadir>/icons)"
echo " --srcdir Sources installation dir (<datadir>/src)"
echo " --docdir Documentation (<prefix>/doc/root)"
echo " --testdir Tests (<docdir>/test)"
echo " --tutdir Tutorials (<docdir>/tutorial)"
echo " --build Build configuration [debug, exception, ...],"
echo " overrides the ROOTBUILD shell variable"
echo "enable/disable options, prefix with either --enable- or --disable-"
echo " shared Use shared 3rd party libraries if possible"
echo " rpath Set library path on executables"
echo " thread Thread support"
Fons Rademakers
committed
echo " star Build STAR contrib library"
Fons Rademakers
committed
echo " ttf True Type Font support, requires libtff"
echo " opengl OpenGL support, requires libGL and libGLU"
echo " cern CERNLIB usage, build h2root and g2root"
echo " mysql MySQL support, requires libmysqlclient"
echo " pgsql PostgreSQL support, requires libpq"
echo " sapdb SapDB support, requires libsqlod and libsqlrte"
Fons Rademakers
committed
echo " rfio SHIFT support, requires libshift.a from CERN"
echo " srp SRP support, requires SRP source tree"
echo " afs AFS support, requires AFS libs and objects"
echo " pythia Pythia5 EG support, requires libPythia"
echo " pythia6 Pythia6 EG support, requires libPythia6"
Fons Rademakers
committed
echo " venus Venus EG support, requires libVenus"
echo " soversion Set version number in sonames"
Fons Rademakers
committed
echo "with options, prefix with --with-, enables corresponding support"
Fons Rademakers
committed
echo " xpm-libdir XPM support, path to libXpm"
echo " thread-libdir Thread support, path to libpthread"
Fons Rademakers
committed
echo " ttf-incdir TTF support, location of freetype.h"
echo " ttf-libdir TTF support, location of libttf"
echo " ttf-fontdir TTF support, location of TTF fonts"
echo " opengl-incdir OpenGL support, location of GL/gl.h"
echo " opengl-libdir OpenGL support, location of libGL"
echo " mysql-incdir MySQL support, location of mysql.h"
echo " mysql-libdir MySQL support, location of libmysqlclient"
echo " pgsql-incdir PostgreSQL support, location of libpq-fe.h"
echo " pgsql-libdir PostgreSQL support, location of libpq"
echo " sapdb-incdir SapDB support, location of sql.h"
echo " sapdb-libdir SapDB support, location of libsqlod"
Fons Rademakers
committed
echo " pythia-libdir PYHTIA support, location of libPythia"
echo " pythia6-libdir PYHTIA6 support, location of libPythia6"
echo " venus-libdir VENUS support, location of libVenus"
echo " cern-libdir HBOOK converter, location of CERNLIB libraries"
echo " shift-libdir RFIO support, location of libshift"
echo " srp Secure Remote Passwd support, location of SRP distribution"
echo " afs AFS support, location of AFS distribution"
echo " sys-iconpath Extra icon path"
echo ""
cat config/ARCHS
}
Fons Rademakers
committed
if [ $# -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 [ "$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 [ "$arch" = "win32" -o "$arch" = "win32gdk" ]; then
platform="win32"
else
platform=$arch
fi
;;
esac
fi
trap "rm -f Makefile.tmp config.tmp root-config.tmp TMakefile.tmp rootrc.tmp \
memprobe.tmp; exit 1" 1 2 3 15
cp -f $MAKEIN Makefile.tmp
cp -f $CONFIN config.tmp
cp -f $RCONFIN root-config.tmp
cp -f $TMAKEIN TMakefile.tmp
Fons Rademakers
committed
cp -f $ROOTRCIN rootrc.tmp
Fons Rademakers
committed
if [ $# -gt 0 ]; then
while [ "$1" != "" ]; 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
#
--with-xpm-libdir=*) xpmlibdir=$optarg ;;
--with-thread-libdir=*) threadlibdir=$optarg ; enable_thread="yes" ;;
Fons Rademakers
committed
--with-ttf-incdir=*) ttfincdir=$optarg ; enable_ttf="yes" ;;
--with-ttf-libdir=*) ttflibdir=$optarg ; enable_ttf="yes" ;;
--with-ttf-fontdir=*) ttffontdir=$optarg ; enable_ttf="yes" ;;
--with-opengl-incdir=*) openglincdir=$optarg ; enable_opengl="yes" ;;
--with-opengl-libdir=*) opengllibdir=$optarg ; enable_opengl="yes" ;;
--with-mysql-incdir=*) mysqlincdir=$optarg ; enable_mysql="yes" ;;
--with-mysql-libdir=*) mysqllibdir=$optarg ; enable_mysql="yes" ;;
--with-pgsql-incdir=*) pgsqlincdir=$optarg ; enable_pgsql="yes" ;;
--with-pgsql-libdir=*) pgsqllibdir=$optarg ; enable_pgsql="yes" ;;
--with-sapdb-incdir=*) sapdbincdir=$optarg ; enable_sapdb="yes" ;;
--with-sapdb-libdir=*) sapdblibdir=$optarg ; enable_sapdb="yes" ;;
Fons Rademakers
committed
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
--with-pythia-libdir=*) pythialibdir=$optarg ; enable_pythia="yes" ;;
--with-pythia6-libdir=*) pythia6libdir=$optarg ; enable_pythia6="yes" ;;
--with-venus-libdir=*) venuslibdir=$optarg ; enable_venus="yes" ;;
--with-cern-libdir=*) cernlibdir=$optarg ; enable_cern="yes" ;;
--with-shift-libdir=*) shiftlibdir=$optarg ; enable_rfio="yes" ;;
--with-srp=*) srpdir=$optarg ; enable_srp="yes" ;;
--with-afs=*) afsdir=$optarg ; enable_afs="yes" ;;
--with-sys-iconpath=*) extraiconpath=$optarg ;;
################################################################
#
# Enable/disable to turn on/off third party software linkage and
# features
#
--enable-shared) enable_shared=yes ;;
--disable-shared) enable_shared=no ;;
--enable-rpath) enable_rpath=yes ;;
--disable-rpath) enable_rpath=no ;;
--enable-star) enable_star=yes ;;
--disable-star) enable_star=no ;;
--enable-ttf) enable_ttf=yes ;;
--disable-ttf) enable_ttf=no ;;
--enable-opengl) enable_opengl=yes ;;
--disable-opengl) enable_opengl=no ;;
--enable-cern) enable_cern=yes ;;
--disable-cern) enable_cern=no ;;
--enable-mysql) enable_mysql=yes ;;
--disable-mysql) enable_mysql=no ;;
--enable-pgsql) enable_pgsql=yes ;;
--disable-pgsql) enable_pgsql=no ;;
--enable-sapdb) enable_sapdb=yes ;;
--disable-sapdb) enable_sapdb=no ;;
Fons Rademakers
committed
--enable-rfio) enable_rfio=yes ;;
--disable-rfio) enable_rfio=no ;;
--enable-thread) enable_thread=yes ;;
--disable-thread) enable_thread=no ;;
--enable-srp) enable_srp=yes ;;
--disable-srp) enable_srp=no ;;
--enable-afs) enable_afs=yes ;;
--disable-afs) enable_afs=no ;;
--enable-pythia) enable_pythia=yes ;;
--disable-pythia) enable_pythia=no ;;
--enable-pythia6) enable_pythia6=yes ;;
--disable-pythia6) enable_pythia6=no ;;
--enable-venus) enable_venus=yes ;;
--disable-venus) enable_venus=no ;;
--enable-soversion) enable_soversion=yes ;;
--disable-soversion) enable_soversion=no ;;
Fons Rademakers
committed
################################################################
#
# Build steering option
#
--build=*) rootbuild="ROOTBUILD := $optarg" ;;
################################################################
#
# Install path options
#
Fons Rademakers
committed
--prefix*) haveconfig=-DHAVE_CONFIG ; prefix=$optarg ;;
--bindir=*) haveconfig=-DHAVE_CONFIG ; bindir=$optarg ;;
--libdir=*) haveconfig=-DHAVE_CONFIG ; libdir=$optarg ;;
--incdir=*) haveconfig=-DHAVE_CONFIG ; incdir=$optarg ;;
--etcdir=*) haveconfig=-DHAVE_CONFIG ; etcdir=$optarg ;;
Fons Rademakers
committed
--mandir=*) haveconfig=-DHAVE_CONFIG ; mandir=$optarg ;;
Fons Rademakers
committed
--datadir=*) haveconfig=-DHAVE_CONFIG ; datadir=$optarg ;;
--macrodir=*) haveconfig=-DHAVE_CONFIG ; macrodir=$optarg ;;
--cintincdir=*) haveconfig=-DHAVE_CONFIG ; cintincdir=$optarg ;;
--iconpath=*) haveconfig=-DHAVE_CONFIG ; iconpath=$optarg ;;
--srcdir=*) haveconfig=-DHAVE_CONFIG ; srcdir=$optarg ;;
--docdir=*) haveconfig=-DHAVE_CONFIG ; docdir=$optarg ;;
--testdir=*) haveconfig=-DHAVE_CONFIG ; testdir=$optarg ;;
--tutdir=*) haveconfig=-DHAVE_CONFIG ; tutdir=$optarg ;;
*) echo "Invalid option. Try $0 --help" ; exit 1 ;;
esac
shift
done
fi
Fons Rademakers
committed
######################################################################
#
# Sonames contain version numbers?
Fons Rademakers
committed
#
if [ "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
######################################################################
#
# XPM Library (Mandatory lib on Unix)
#
# Mandetory test, must succeed
# Check for Xpm library
#
Fons Rademakers
committed
echo $ac_n "Checking for libXpm ... $ac_c"
if [ "x$xpmlibdir" != "x" ]; then
libdirs=$xpmlibdir
else
libdirs="$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"
fi
xpmlib=no
xpmdir=no
if [ "x$enable_shared" != "xno" ]; then
libs="libXpm.so libXpm.sl libXpm.a"
else
libs="libXpm.a"
fi
for i in $libdirs; do
for j in ${libs} ; do
if [ -r $i/$j ]; then
xpmlibdir=$i
xpmlib=$j
break 2
Fons Rademakers
committed
fi
Fons Rademakers
committed
done
done
echo $xpmlibdir
unset libs
unset libdirs
if [ "x$xpmlib" = "xno" ]; then
Fons Rademakers
committed
echo "libXpm must be on the system - Aborting"
exit 1
fi
if [ "x$enable_shared" = "xno" -o "x$xpmlib" = "xlibXpm.a" ]; then
Fons Rademakers
committed
xpmlib=${xpmlibdir}/${xpmlib}
unset xpmlibdir
else
xpmlib=`echo $xpmlib | sed 's|lib\(.*\)\..*|-l\1|'`
xpmlibdir=-L${xpmlibdir}
fi
Fons Rademakers
committed
######################################################################
#
# Posix Thread Library
#
# Check for posix thread library
#
if [ "$arch" = "linux" -a "x$enable_thread" = "x" ]; then
Fons Rademakers
committed
enable_thread="yes"
fi
if [ "x$enable_thread" = "xyes" -a "$platform" != "win32" ]; then
Fons Rademakers
committed
echo $ac_n "Checking for libpthread ... $ac_c"
if [ "x$threadlibdir" != "x" ]; then
libdirs=$threadlibdir
else
libdirs="$THREAD $THREAD/lib /usr/lib /usr/local/lib \
/usr/lib/X11 /usr/local/lib/X11 /usr/X11R6/lib \
/usr/local/X11R6/lib /usr/X11/lib /usr/shlib"
Fons Rademakers
committed
fi
threadlib=no
threadlibdir=no
Fons Rademakers
committed
if [ "x$enable_shared" != "xno" ]; then
libs="libpthread.so libpthread.sl libpthread.a"
else
libs="libpthread.a"
fi
for i in $libdirs; do
for j in ${libs} ; do
if [ -r $i/$j ]; then
threadlibdir=$i
threadlib=$j
break 2
Fons Rademakers
committed
fi
Fons Rademakers
committed
done
done
echo $threadlibdir
unset libs
unset libdirs
if [ "x$threadlib" = "xno" ]; then
unset threadlib
unset threadlibdir
enable_thread="no"
else
if [ "x$enable_shared" = "xno" -o \
"x$threadlib" = "xlibthread.a" ]; then
Fons Rademakers
committed
threadlib=${threadlibdir}/${threadlib}
unset threadlibdir
else
threadlib=`echo $threadlib | sed 's|lib\(.*\)\..*|-l\1|'`
threadlibdir=-L${threadlibdir}
fi
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
# FreeType Support (Third party libraries)
#
# (see freetype.org)
#
if [ "x$enable_ttf" != "xno" -a "$platform" != "win32" ]; then
Fons Rademakers
committed
# Check for FreeType TTF include, library and fonts
echo $ac_n "Checking for freetype.h ... $ac_c"
if [ "x$ttfincdir" != "x" ]; then
# If the user gave an explicit path, then we check if it's correct.
ttfincdirs=$ttfincdir
else
# Otherwise, we search some canonical paths
ttfincdirs="$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"
Fons Rademakers
committed
fi
ttfincdir=no
ttfheaders="freetype.h"
for i in ${ttfincdirs}; do
for j in ${ttfheaders}; do
if [ -r $i/$j ]; then
ttfincdir=$i
break 2
Fons Rademakers
committed
fi
Fons Rademakers
committed
done
done
echo $ttfincdir
unset ttfheaders
unset ttfincdirs
echo $ac_n "Checking for libttf ... $ac_c"
Fons Rademakers
committed
if [ "x$ttflibdir" != "x" ]; then
# If the user gave an explixit path, then check it
libdirs=$ttflibdir
else
# Otherwise, search canonical paths
libdirs="$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"
fi
if [ "x$enable_shared" != "xno" ]; then
libs="libttf.so libttf.sl libttf.a"
else
libs="libttf.a"
fi
ttflibdir=no
for i in $libdirs; do
for j in ${libs}; do
Fons Rademakers
committed
if [ -r "$i/$j" ]; then
Fons Rademakers
committed
ttflibdir=$i
ttflib=$j
break 2
Fons Rademakers
committed
fi
Fons Rademakers
committed
done
done
echo $ttflibdir
unset libs
unset libdirs
echo $ac_n "Checking for ttf fonts (arial.ttf) ... $ac_c"
if [ "x$ttffontdir" != "x" ]; then
ttffontdirs=$ttffontdir
else
ttffontdirs="$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"
fi
ttffontdir=no
ttffonts=arial.ttf
for i in $ttffontdirs; do
for j in ${ttffonts}; do
Fons Rademakers
committed
if [ -r "$i/$j" ]; then
Fons Rademakers
committed
ttffontdir=$i
break 2
Fons Rademakers
committed
fi
Fons Rademakers
committed
done
done
echo $ttffontdir
unset ttffontdirs
unset ttffonts
# Give up if none of the above found
if [ "x$ttflibdir" = "xno" -o \
"x$ttfincdir" = "xno" -o \
Fons Rademakers
committed
"x$ttffontdir" = "xno" ]; then
enable_ttf="no"
unset ttflibdir
unset ttflib
unset ttfincdir
unset ttffontdir
Fons Rademakers
committed
else
if [ "x$enable_shared" = "xno" -o "x$ttflib" = "xlibttf.a" ]; then
Fons Rademakers
committed
ttflib=${ttflibdir}/${ttflib}
unset ttflibdir
else
ttflib=`echo $ttflib | sed 's|lib\(.*\)\..*|-l\1|'`
ttflibdir=-L${ttflibdir}
fi
if [ "x$ttfincdir" = "x/usr/include" ]; then
ttfincdir="include"
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
# OpenGL Support (Third party libraries)
#
Fons Rademakers
committed
#
if [ "x$enable_opengl" != "xno" -a "$platform" != "win32" ]; then
Fons Rademakers
committed
# Check for Mesa OpenGL compatible include and library
echo $ac_n "Checking for GL/gl.h ... $ac_c"
if [ "x$openglincdir" != "x" ]; then
openglincdirs=$openglincdir
else
openglincdirs="$OPENGL $OPENGL/include /usr/include \
/usr/include/X11 /usr/X11/include /usr/X11R6/include \
/usr/local/include/X11 /usr/local/X11R6/include \
Fons Rademakers
committed
/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"
fi
openglincdir=no
openglheaders="GL/gl.h"
for i in $openglincdirs; do
for j in ${openglheaders}; do
Fons Rademakers
committed
if [ -r "$i/$j" ]; then
Fons Rademakers
committed
openglincdir=$i
break 2
Fons Rademakers
committed
fi
Fons Rademakers
committed
done
done
echo $openglincdir
unset openglincdirs
unset openglheaders
Fons Rademakers
committed
Fons Rademakers
committed
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
echo $ac_n "Checking for libGL ... $ac_c"
if [ "x$opengllibdir" != "x" ]; then
libdirs=$opengllibdir
else
libdirs="$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"
fi
if [ "x$enable_shared" != "xno" ]; then
libs="libGL.so libGL.sl libMesaGL.so libMesaGL.sl libGL.a libMesaGL.a"
else
libs="libGL.a libMesaGL.a"
fi
opengllib=no
opengllibdir=no
for i in $libdirs; do
for j in $libs; do
if [ -r "$i/$j" ]; then
opengllibdir=$i
opengllib=$j
break 2
fi
done
done
echo $opengllibdir
unset libs
Fons Rademakers
committed
Fons Rademakers
committed
echo $ac_n "Checking for libGLU ... $ac_c"
if [ "x$enable_shared" != "xno" ]; then
libs="libGLU.so libGLU.sl libMesaGLU.so libMesaGLU.sl libGLU.a \
libMesaGLU.a"
else
libs="libGLU.a libMesaGLU.a"
fi
openglulib=no
for i in $libdirs; do
for j in $libs; do
Fons Rademakers
committed
if [ -r "$i/$j" ]; then
Fons Rademakers
committed
opengllibdir=$i
openglulib=$j
break 2
Fons Rademakers
committed
fi
Fons Rademakers
committed
done
done
echo $opengllibdir
unset libs
unset libdirs
if [ "x$openglincdir" = "xno" -o \
"x$opengllibdir" = "xno" -o \
"x$openglulib" = "xno" ]; then
enable_opengl="no"
unset openglincdir
unset opengllibdir
unset opengllib
unset openglulib
else
if [ "x$enable_shared" = "xno" ]; then
opengllib=${opengllibdir}/${opengllib}
openglulib=${opengllibdir}/${openglulib}
unset opengllibdir
else
opengllib=`echo $opengllib | sed 's|lib\(.*\)\..*|-l\1|'`
openglulib=`echo $openglulib | sed 's|lib\(.*\)\..*|-l\1|'`
opengllibdir=-L${opengllibdir}
fi
if [ "x$openglincdir" = "x/usr/include" ]; then
openglincdir="include"
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
# OpenGL support on Windoze
#
# On win32 we always have OpenGL available (is this true?)
#
enable_opengl="yes"
openglincdir="include"
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
# MySQL Support (Third party libraries)
#
# (See mysql.org)
#
# If the user has set the flags "--disable-mysql", we don't check for
Fons Rademakers
committed
#
if [ "x$enable_mysql" != "xno" ]; then
# Check for MySQL include and library
echo $ac_n "Checking for mysql.h ... $ac_c"
if [ "x$mysqlincdir" != "x" ]; then
# If the user has given an explict path, then we check to see if
# the mysql.h header file really is where it's supposed to be.
mysqlincdirs=$mysqlincdir
else
# Othewise, search canonical paths
mysqlincdirs="$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"
fi
mysqlheaders="mysql.h"
mysqlincdir=no
for i in ${mysqlincdirs}; do
for j in ${mysqlheaders}; do
if [ -r "$i/$j" ]; then
Fons Rademakers
committed
mysqlincdir=$i
break 2
fi
done
done
echo $mysqlincdir
unset mysqlincdirs
unset mysqlheaders
Fons Rademakers
committed
Fons Rademakers
committed
echo $ac_n "Checking for libmysqlclient ... $ac_c"
if [ "x$mysqllibdir" != "x" ]; then
# If the user gave an explicit path, check to see if the client
# library really is where it's supposed to be
libdirs=$mysqllibdir
Fons Rademakers
committed
else
libdirs="$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"
fi
# If the "--enable-shared" flag is set, we first look for the
Fons Rademakers
committed
# shared library then the static one.
if [ "x$enable_shared" != "xno" ]; then
libs="libmysqlclient.so libmysqlclient.sl libmysqlclient.a \
libmysqlclient.lib"
else
libs="libmysqlclient.a libmysqlclient.lib"
fi
mysqllibdir=no
for i in $libdirs; do
for j in ${libs} ; do
if [ -r "$i/$j" ]; then
Fons Rademakers
committed
mysqllibdir=$i
mysqllib=$j
break 2
Fons Rademakers
committed
done
done
echo ${mysqllibdir}
Fons Rademakers
committed
unset libs
Fons Rademakers
committed
Fons Rademakers
committed
if [ "x$mysqlincdir" = "xno" -o "x$mysqllibdir" = "xno" ]; then
unset mysqllib
unset mysqlincdir
unset mysqllibdir
enable_mysql="no"
else
Fons Rademakers
committed
unset mysqllibdir
elif [ "x$enable_shared" = "xno" -o \
"x$mysqllib" = "xlibmysqlclient.a" ]; then
Fons Rademakers
committed
mysqllib=${mysqllibdir}/${mysqllib}
unset mysqllibdir
else
mysqllib=`echo $mysqllib | sed 's|lib\(.*\)\..*|-l\1|'`
mysqllibdir=-L${mysqllibdir}
fi
if [ "x$mysqlincdir" = "x/usr/include" ]; then
mysqlincdir="include"
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
# PostgreSQL Support (Third party libraries)
#
# (See postgresql.org)
#
# If the user has set the flags "--disable-pgsql", we don't check for
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
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
750
751
752
753
754
755
756
#
if [ "x$enable_pgsql" != "xno" ]; then
# Check for PgSQL include and library
echo $ac_n "Checking for libpq-fe.h ... $ac_c"
if [ "x$pgsqlincdir" != "x" ]; then
# If the user has given an explict path, then we check to see if
# the libpq-fe.h header file really is where it's supposed to be.
pgsqlincdirs=$pgsqlincdir
else
# Othewise, search canonical paths
pgsqlincdirs="$PGSQL $PGSQL/include /usr/include \
/usr/local/include /usr/local/pgsql/include \
/usr/include/pgsql /usr/pgsql/include \
/usr/local/include/pgsql /usr/pgsql \
/usr/local/pgsql /opt/pgsql /opt/pgsql/include"
fi
pgsqlheaders="libpq-fe.h"
pgsqlincdir=no
for i in ${pgsqlincdirs}; do
for j in ${pgsqlheaders}; do
if [ -r "$i/$j" ]; then
pgsqlincdir=$i
break 2
fi
done
done
echo $pgsqlincdir
unset pgsqlincdirs
unset pgsqlheaders
echo $ac_n "Checking for libpq ... $ac_c"
if [ "x$pgsqllibdir" != "x" ]; then
# If the user gave an explicit path, check to see if the client
# library really is where it's supposed to be
libdirs=$pgsqllibdir
else
libdirs="$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"
fi
# If the "--enable-shared" flag is set, we first look for the
# shared library then the static one.
if [ "x$enable_shared" != "xno" ]; then
libs="libpq.so libpq.sl libpq.a \
libpq.lib"
else
libs="libpq.a libpq.lib"
fi
pgsqllibdir=no
for i in $libdirs; do
for j in ${libs} ; do
if [ -r "$i/$j" ]; then
pgsqllibdir=$i
pgsqllib=$j
break 2
fi
done
done
echo ${pgsqllibdir}
unset libs
if [ "x$pgsqlincdir" = "xno" -o "x$pgsqllibdir" = "xno" ]; then
unset pgsqllib
unset pgsqlincdir
unset pgsqllibdir
enable_pgsql="no"
else
pgsqllib=${pgsqllibdir}/${pgsqllib}
unset pgsqllibdir
elif [ "x$enable_shared" = "xno" -o \
"x$pgsqllib" = "xlibpq.a" ]; then
pgsqllib=${pgsqllibdir}/${pgsqllib}
unset pgsqllibdir
else
pgsqllib=`echo $pgsqllib | sed 's|lib\(.*\)\..*|-l\1|'`
pgsqllibdir=-L${pgsqllibdir}
fi
if [ "x$pgsqlincdir" = "x/usr/include" ]; then
pgsqlincdir="include"
fi
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
######################################################################
#
# 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 [ "x$enable_sapdb" != "xno" ]; then
# Check for SapDB include and library
echo $ac_n "Checking for sql.h ... $ac_c"
if [ "x$sapdbincdir" != "x" ]; then
# If the user has given an explict path, then we check to see if
# the sql.h header file really is where it's supposed to be.
sapdbincdirs=$sapdbincdir
else
# Othewise, search canonical paths
sapdbincdirs="$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"
fi
sapdbheaders="sql.h"
sapdbincdir=no
for i in ${sapdbincdirs}; do
for j in ${sapdbheaders}; do
if [ -r "$i/$j" ]; then
sapdbincdir=$i
break 2
fi
done
done
echo $sapdbincdir
unset sapdbincdirs
unset sapdbheaders
echo $ac_n "Checking for libsqlod ... $ac_c"
if [ "x$sapdblibdir" != "x" ]; then
# If the user gave an explicit path, check to see if the client
# library really is where it's supposed to be
libdirs=$sapdblibdir
else
libdirs="$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"
fi
# If the "--enable-shared" flag is set, we first look for the
# shared library then the static one.
if [ "x$enable_shared" != "xno" ]; then
libs="libsqlod.so libsqlod.sl libsqlod.a \
libsqlod.lib"
else
libs="libsqlod.a libsqlod.lib"
fi
sapdblibdir=no
for i in $libdirs; do
for j in ${libs} ; do
if [ -r "$i/$j" ]; then
sapdblibdir=$i
sapdblib=$j
break 2
fi
done
done
echo ${sapdblibdir}
unset libdirs
unset libs
if [ "x$sapdbincdir" = "xno" -o "x$sapdblibdir" = "xno" ]; then
unset sapdblib
unset sapdbincdir
unset sapdblibdir
enable_sapdb="no"
else
sapdblib="${sapdblibdir}/${sapdblib} ${sapdblibdir}/libsqlrte.lib"
unset sapdblibdir
elif [ "x$enable_shared" = "xno" -o \
"x$sapdblib" = "xlibsqlod.a" ]; then
sapdblib="${sapdblibdir}/${sapdblib} ${sapdblibdir}/libsqlrte.a"
unset sapdblibdir
else
sapdblib1=`echo $sapdblib | sed 's|lib\(.*\)\..*|-l\1|'`
sapdblib2=`echo libsqlrte.so | sed 's|lib\(.*\)\..*|-l\1|'`
sapdblib="${sapdblib1} ${sapdblib2}"
sapdblibdir=-L${sapdblibdir}
fi
if [ "x$sapdbincdir" = "x/usr/include" ]; then
sapdbincdir="include"
fi
fi
fi
Fons Rademakers
committed
######################################################################
#
# CERNLIB Usage (Third party libraries)
#
# (See http://www.cern.ch)
#
Fons Rademakers
committed
# Check for CERN libs (libpacklib and libkernlib)
Fons Rademakers
committed
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
#
if [ "x$enable_cern" != "xno" ]; then
echo $ac_n "Checking for libpacklib ... $ac_c"
if [ "x${cernlibdir}" != "x" ]; then
libdirs="$cernlibdir"
else
libdirs="$CERNLIB $CERNLIB/lib ${CERN}/${CERN_LEVEL}/lib \
/cern/pro/lib /cern/new/lib /cern/new/lib \
/opt/cern/pro/lib /opt/cern/new/lib /opt/cern/new/lib \
/usr/local/cern/pro/lib /usr/local/cern/new/lib \
/usr/local/cern/old/lib /usr/lib /usr/lib/cern"
fi
if [ "x$enable_shared" != "xno" ]; then
libs="libpacklib.so libpacklib.sl libpacklib.a packlib.lib"
else
libs="libpacklib.a packlib.lib"
fi
cernlibdir=no
for i in $libdirs; do
for j in $libs; do
if [ -r "$i/$j" ]; then
cernlibdir=$i
break 2
fi
done
done
echo $cernlibdir
unset libs
unset libdirs
if [ "x$cernlibdir" = "xno" ]; then
enable_cern="no"
unset cernlibdir;
unset cernlib
else
cernlib="${cernlibdir}/packlib.lib ${cernlibdir}/kernlib.lib"
Fons Rademakers
committed
unset cernlibdir
elif [ "x$enable_shared" = "xno" ]; then
cernlib="${cernlibdir}/libpacklib.a ${cernlibdir}/libkernlib.a"
unset cernlibdir
else
cernlib="-lpacklib -lkernlib"
cernlibdir=-L${cernlibdir}
fi
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
# Pythia5 Usage (Third party libraries)
#
# (See http://root.cern.ch and Lund)
#
Fons Rademakers
committed
# Check for libPythia
Fons Rademakers
committed
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
#
if [ "x$enable_pythia" != "xno" ]; then
echo $ac_n "Checking for libPythia ... $ac_c"
if [ "x$pythialibdir" != "x" ]; then
libdirs=${pythialibdir}
else
libdirs="$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"
fi
if [ "x$enable_shared" != "xno" ]; then
libs="libPythia.so libPythia.sl libPythia.a libPythia.lib"
else
libs="libPythia.a libPythia.lib"
fi
pythialib=no
pythialibdir=no
for i in $libdirs; do
for j in $libs; do
if [ -r "$i/$j" ]; then
pythialibdir=$i
pythialib=$j
break 2
fi
done
done
echo $pythialibdir
unset libs
unset libdirs
if [ "x$pythialibdir" = "xno" ]; then
unset pythialib
unset pythialibdir
enable_pythia=no
else
Fons Rademakers
committed
unset pythialibdir
elif [ "x$enable_shared" = "xno" ]; then
pythialib=${pythialibdir}/${pythialib}
unset pythialibdir
else
pythialib=`echo $pythialib | sed 's|lib\(.*\)\..*|-l\1|'`
pythialibdir=-L${pythialibdir}
fi
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
######################################################################
#
# Pythia6 Usage (Third party libraries)
#