Newer
Older
odbcincdir=""
odbclib="odbc32.lib"
odbclibdir=""
enable_odbc="yes"
else
check_header "sqlext.h" "$odbcincdir" \
$ODBC $ODBC/include $ODBCINCDIR /usr/local/include \
/usr/include $finkdir/include
odbcinc=$found_hdr
odbcincdir=$found_dir
check_library "libiodbc libodbc odbc32" "$enable_shared" "$odbclibdir" \
$ODBC $ODBC/lib $ODBCLIBDIR /usr/local/lib /usr/lib \
$finkdir/lib
odbclib=$found_lib
odbclibdir=$found_dir
if test "x$odbcincdir" = "x" || test "x$odbclib" = "x"; then
enable_odbc="no"
fi
check_explicit "$enable_odbc" "$enable_odbc_explicit" \
"Explicitly required ODBC dependencies not fulfilled"
######################################################################
#
### echo %%% Qt Support - Optional alternative graphics backend
#
# If the user has not set the flags "--enable-qt" or "--enable-qtgsi",
# we don't check for Qt at all.
check_qtvers()
{
qttestdir=$1 ; shift
qtverneed=$1 ; shift
qttoonew=$1 ; shift
message " Checking whether $qtverneed <= Qt version < $qttoonew under $qttestdir/qglobal.h "
logmsg " grep '# *define *QT_VERSION_STR *' $qttestdir/qglobal.h"
qtverstr=`grep "# *define *QT_VERSION_STR *" $qttestdir/qglobal.h | \
sed '-e s/[^"]*"//' -e 's/".*$//' 2>> $logfile`
qtvers=0
if test $? -eq 0 ; then
logmsg " Got Qt version $qtverstr"
qtgot=`echo $qtverstr | \
awk 'BEGIN {FS="."} {printf "%d", ((($1*2^8)+$2)*2^8)+$3; }'`
qtneed=`echo $qtverneed | \
awk 'BEGIN {FS="."}{ printf "%d", (($1*2^8)+$2)*2^8+$3; }'`
qtnew=`echo $qttoonew | \
awk 'BEGIN {FS="."}{ printf "%d", (($1*2^8)+$2)*2^8+$3; }'`
logmsg " Got $qtgot, min $qtneed, max $qtnew"
if test $qtgot -lt $qtneed ; then
logmsg " Please update to Qt $qtverneed"
res="no"
elif test $qtgot -ge $qtnew; then
logmsg " Qt $qtverstr too new (>= $qttoonew)"
res="no"
else
res="$qtverstr"
qtvers=`echo $qtverstr | awk 'BEGIN {FS="."} {print $1}'`
fi
else
res="no"
fi
result $res
}
if test ! "x$enable_qt" = "xno" || \
test ! "x$enable_qtgsi" = "xno"; then
if test ! "x$QTDIR" = "x"; then
# The user asked for a specific "QTDIR" ... search ONLY in there
check_header "Qt/qglobal.h" "$qtincdir" $QTDIR $QTDIR/include
else
check_header "Qt/qglobal.h" "$qtincdir" $QTDIR/include \
/usr/local/include/ /usr/local/qt/include \
/usr/include /usr/include/qt4
qt4="yes"
qtinc=$found_hdr
qtmainincdir=$found_dir
qtincdir=$qtmainincdir
qtdirlist=`ls $qtmainincdir`
for i in $qtdirlist ; do
if test -r $qtmainincdir/$i ; then
qtincdir="$qtincdir $qtmainincdir/$i"
fi
qtverneed="4.3.0"
qttoonew="5.0.0"
if test "x$platform" = xwin32 ; then
qttestdir=$qtmainincdir/../src/corelib/global
else
qttestdir=$qtmainincdir/Qt
fi
check_qtvers "$qttestdir" $qtverneed $qttoonew
if test $qtvers -eq 4 ; then
qt4suffix="4"
if test "x$enable_winrtdebug" = "xyes"; then
qt4suffix="d4"
check_library "libQtCore QtCore QtCore$qt4suffix QtCore4" "$enable_shared" \
"$qtlibdir" $QTDIR $QTDIR/lib /usr/local/lib \
/usr/local/qt/lib /usr/lib /usr/qt/lib
qtlib=$found_lib
qtlibdir=$found_dir
check_library "libQtGui QtGui QtGui$qt4suffix QtGui4" "$enable_shared" \
check_library "libQt3Support Qt3Support Qt3Support$qt4suffix Qt3Support4" \
"$enable_shared" "$found_raw_dir" ""
qtlib="$qtlib $found_lib"
check_library "libQtOpenGL QtOpenGL QtOpenGL$qt4suffix QtOpenGL4" \
check_library "libQtSvg QtSvg QtSvg$qt4suffix QtSvg4" "$enable_shared" \
"$found_raw_dir" ""
qtlib="$qtlib $found_lib"
check_library "libQtXml QtXml QtXml$qt4suffix QtXml4" "$enable_shared" \
"$found_raw_dir" ""
qtlib="$qtlib $found_lib"
else
qtinc=
qtmainincdir=
qtincdir=
fi
fi
logmsg "No Qt4 was found, let's try to find Qt3 instead"
if test ! "x$QTDIR" = "x"; then
# The user asked for a specific "QTDIR" ... search ONLY in there
check_header "qt.h" "$qtincdir" $QTDIR $QTDIR/include
else
# Try to search in all system default subdirectories ...
check_header "qt.h" "$qtincdir" $QTDIR $QTDIR/include \
/usr/local/include /usr/local/qt/include /usr/include \
/usr/include/qt /usr/include/qt3
if test ! "x$found_hdr" = "x" ; then
qtverneed="3.3.0"
qttoonew="4.0.0"
qttestdir=$qtincdir
check_qtvers "$qttestdir" $qtverneed $qttoonew
fi
check_library \
"libqt-mt libqt qt-mt* qt-mt334 qt-mt335 qt-mt336 qt" \
"$enable_shared" "$qtlibdir" \
$QTDIR $QTDIR/lib /usr/local/lib /usr/local/qt/lib /usr/lib \
/usr/qt/lib
qtlib=$found_lib
qtlibdir=$found_dir
else
qtinc=
qtincdir=
fi
fi
message "Checking for moc or moc.exe"
# we can pick the wrong moc this way -- qtmocexe=`$cwhich moc`
# we can pick the wrong moc this way -- if test $? -ne 0 ; then
for i in $QTDIR $QTDIR/bin /usr/local/bin /usr/local/qt/bin /usr/bin \
/usr/qt3/bin /usr/share/qt3/bin ; do
logmsg " Checking for $qtmocexe in $i"
for j in $i/moc-qt${qtvers} $i/moc-qt${qtvers}.exe $i/moc $i/moc.exe ;
do
moc_vers=`$j -v >/dev/stdout 2>&1 | \
sed -e 's/.*(Qt //' -e 's/\.[0-9]*\.[0-9]*)//'`
if test ! "$moc_vers" = "$qtvers" ; then
continue
fi
qtmocexe=$j
logmsg " $qtmocexe is executable"
break
fi
done
if test ! "x$qtmocexe" = "x" ; then break ; fi
done
# Correct path for win32
if test "x$platform" = "xwin32"; then
if test ! "x$qtmocexe" = "x" ; then
qtmocexe=`cygpath -u $qtmocexe`
fi
# we can pick the wrong moc this way -- fi
if test ! "x$qtmocexe" = "x" ; then
result "$qtmocexe"
else
result "no"
fi
if test "x$qtincdir" = "x" || test "x$qtlib" = "x" || \
test "x$qtmocexe" = "x" || test $qtvers -eq 0 ; then
check_explicit "$enable_qt" "$enable_qt_explicit" \
"Explicitly required Qt dependencies not fulfilled"
Fons Rademakers
committed
######################################################################
#
### echo %%% RFIO Support - Third party libraries
Fons Rademakers
committed
#
Fons Rademakers
committed
#
# Check for rfio_api.h of CASTOR 2 and librfio or libshift
Fons Rademakers
committed
#
shiftold=""
Fons Rademakers
committed
if test ! "x$enable_rfio" = "xno" ; then
# Check for RFIO include and library
keepincdir=$shiftincdir
check_header "rfio_api.h" "$shiftincdir" $RFIO $RFIO/include $RFIO/h \
/cern/pro/include /cern/new/include /cern/old/include \
/opt/shift/include /usr/local/shift/inlcude /usr/include/shift \
/usr/local/include/shift /usr/include /usr/local/include
shiftinc=$found_hdr
shiftincdir=$found_dir
if test ! "x$shiftincdir" = "x"; then
message "Checking whether rfio_fchmod declared in $shiftinc"
logmsg " grep rfio_fchmod $shiftincdir/$shiftinc"
if `grep rfio_fchmod $shiftincdir/$shiftinc >> $logfile 2>&1` ; then
result "yes"
else
shiftincdir=""
shiftold="yes"
result "no"
result "### Found old version of libshift, please uprade to >=1.5.2"
fi
fi
check_library "librfio libshift shiftmd shift" "$enable_shared" \
"$shiftlibdir" \
Fons Rademakers
committed
$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$shiftincdir" = "x" || test "x$shiftlib" = "x"; then
Fons Rademakers
committed
enable_rfio="no"
else
case $platform in
linux) shiftlib="$shiftlib -lnsl"
for i in "" -ladns ; do
echo "extern rfio_fchmod(); int main() { rfio_fchmod(); return 0; }" > conftest.c
logmsg " Checking if we can link against $shiflib"
logmsg " gcc conftest.c $shiftlibdir $shiftlib $i -o conftest"
gcc conftest.c $shiftlibdir $shiftlib $i -o conftest >> $logfile 2>&1
if test $? -eq 0 ; then
shiftlib="$shiftlib $i" ;
break ;
else
done
rm -f conftest.c conftest
;;
Fons Rademakers
committed
solaris) shiftlib="$shiftlib -lposix4" ;;
win32) shiftincdir="$shiftincdir $shiftincdir/../win32"
shiftlib="$shiftlib WSock32.lib Ws2_32.lib" ;;
Fons Rademakers
committed
esac
fi
fi
check_explicit "$enable_rfio" "$enable_rfio_explicit" \
"Explicitly required RFIO dependencies not fulfilled"
Fons Rademakers
committed
######################################################################
#
### echo %%% CASTOR Support - Third party libraries
#
# (See http://savannah.cern.ch/files/?group=castor)
#
# Check for rfio_api.h, stager_api.h for CASTOR 2 and libshift
#
castorold=""
if test ! "x$enable_castor" = "xno" ; then
# Check for Castor include and library
keepincdir=$castorincdir
check_header "rfio_api.h" "$castorincdir" $CASTOR $CASTOR/include $CASTOR/h \
/cern/pro/include /cern/new/include /cern/old/include \
/opt/shift/include /usr/local/shift/inlcude /usr/include/shift \
/usr/local/include/shift /usr/include /usr/local/include
castorinc=$found_hdr
castorincdir=$found_dir
if test ! "x$castorincdir" = "x"; then
message "Checking whether rfio_fchmod declared in $castorinc"
logmsg " grep rfio_fchmod $castorincdir/$castorinc"
if `grep rfio_fchmod $castorincdir/$castorinc >> $logfile 2>&1` ; then
result "yes"
else
castorincdir=""
castorold="yes"
result "no"
result "### Found old version of libshift, please uprade to >=1.5.2"
fi
fi
check_header "stager_api.h" "$keepincdir" $CASTOR $CASTOR/include $CASTOR/h \
/cern/pro/include /cern/new/include /cern/old/include \
/opt/shift/include /usr/local/shift/inlcude /usr/include/shift \
/usr/local/include/shift /usr/include /usr/local/include
stagerinc=$found_hdr
if test ! "x$stagerinc" = "x"; then
castorcflags=-DR__CASTOR2
# check for Castor >= 2.1
message "Checking for Castor version being 2.1.0-* or 2.1.1-*"
castor_version=`grep "define BASEVERSION" $castorincdir/patchlevel.h | sed 's/^.*"\([0-9]\.[0-9]\.[0-9]\)"/\1/' | awk 'BEGIN { FS="." } { printf "%d", $1 * 1000000 + $2 * 1000 + $3}'`
if test $castor_version -lt 2001000; then
base_vers=`grep "define BASEVERSION" $castorincdir/patchlevel.h | sed 's/^.*"\([0-9]\.[0-9]\.[0-9]\)"/\1/' | awk '{ printf $1}'`
patch_level=`grep "define PATCHLEVEL" $castorincdir/patchlevel.h | awk '{ printf $3}'`
result "no, $base_vers-$patch_level"
castorincdir=""
else
result "ok"
fi
fi
check_library "libshift shiftmd shift" "$enable_shared" "$castorlibdir" \
$CASTOR $CASTOR/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
castorlib=$found_lib
castorlibdir=$found_dir
if test "x$castorincdir" = "x" || test "x$castorlib" = "x"; then
enable_castor="no"
else
case $platform in
linux) castorlib="$castorlib -lnsl"
for i in "" -ladns ; do
echo "extern rfio_fchmod(); int main() { rfio_fchmod(); return 0; }" > conftest.c
logmsg " Checking if we can link against $castorlib"
logmsg " gcc conftest.c $castorlibdir $castorlib $i -o conftest"
gcc conftest.c $castorlibdir $castorlib $i -o conftest >> $logfile 2>&1
if test $? -eq 0 ; then
castorlib="$castorlib $i" ;
break ;
else
cat conftest.c >> $logfile
fi
done
rm -f conftest.c conftest
;;
solaris) castorlib="$castorlib -lposix4" ;;
win32) castorincdir="$castorincdir $castorincdir/../win32"
castorlib="$castorlib WSock32.lib Ws2_32.lib" ;;
esac
fi
fi
check_explicit "$enable_castor" "$enable_castor_explicit" \
"Explicitly required Castor dependencies not fulfilled"
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
######################################################################
#
### echo %%% GFAL Support - Third party libraries
#
# (See http://grid-deployment.web.cern.ch/grid-deployment/gis/GFAL/gfal.3.html)
#
# If the user has set the flags "--disable-gfal", we don't check for
# GFAL at all.
#
if test ! "x$enable_gfal" = "xno"; then
# Check for GFAL include and library
check_header "gfal_api.h" "$gfalincdir" $GFAL $GFAL/include \
/opt/lcg/include /opt/gfal/include /usr/local/lcg/include \
/usr/local/gfal/include
gfalinc=$found_hdr
gfalincdir=$found_dir
check_library "libgfal" "$enable_shared" "$gfallibdir" \
$GFAL $GFAL/lib /opt/lcg/lib /opt/gfal/lib /usr/local/lcg/lib \
/usr/local/gfal/lib
gfallib=$found_lib
gfallibdir=$found_dir
if test "x$gfalincdir" = "x" || test "x$gfallib" = "x"; then
enable_gfal="no"
fi
fi
check_explicit "$enable_gfal" "$enable_gfal_explicit" \
"Explicitly required GFAL dependencies not fulfilled"
######################################################################
#
### echo %%% GEANT4 Support - Third party libraries
#
# (See http://geant4.web.cern.ch/geant4/)
#
# If the user has set the flags "--disable-g4root", we don't check for
# GEANT4 at all.
#
if test ! "x$enable_g4root" = "xno"; then
# Check for GEANT4 include and library
check_header "G4Navigator.hh" "$g4incdir" "$g4incdir" \
$G4INCLUDE /opt/geant4/include /opt/g4/include \
/usr/local/include /usr/include
if test ! "$G4LIB/$G4SYSTEM" = "/"; then
G4SYSLIBDIR=$G4LIB/$G4SYSTEM
fi
check_library "libG4navigation" "$enable_shared" "$g4libdir" \
$G4SYSLIBDIR /opt/geant4/lib /opt/g4/lib /usr/local/lib /usr/lib
g4rootlib=$found_lib
g4libdir=$found_dir
# Check for CLHEP include
check_header "CLHEP/Vector/Rotation.h" "$clhepincdir" "$clhepincdir" \
$CLHEP_INCLUDE_DIR
clhepinc=$found_hdr
clhepincdir=$found_dir
if test "x$g4incdir" = "x" || test "x$g4rootlib" = "x" || test "x$clhepincdir" = "x"; then
enable_g4root="no"
fi
fi
check_explicit "$enable_g4root" "$enable_g4root_explicit" \
"Explicitly required G4root dependencies not fulfilled"
######################################################################
#
### echo %%% Monalisa Support - Third party libraries
#
# (See http://monalisa.cacr.caltech.edu/monalisa__Download__ApMon.html)
#
# If the user has set the flags "--disable-monalisa", we don't check for
# Monalisa at all.
#
if test ! "x$enable_monalisa" = "xno"; then
# Check for Monalisa include and library
check_header "ApMon.h" "$monalisaincdir" $MONALISA $MONALISA/include \
/usr/local/include /opt/alien/api/include /opt/monalisa/include \
/usr/include
monalisainc=$found_hdr
monalisaincdir=$found_dir
check_library "libapmoncpp" "$enable_shared" "$monalisalibdir" \
$MONALISA $MONALISA/lib /usr/local/lib /opt/alien/api/lib \
/opt/monalisa/lib /usr/lib
monalisalib=$found_lib
monalisalibdir=$found_dir
if test "x$monalisaincdir" = "x" || test "x$monalisalib" = "x"; then
enable_monalisa="no"
fi
fi
check_explicit "$enable_monalisa" "$enable_monalisa_explicit" \
"Explicitly required MonaLisa dependencies not fulfilled"
######################################################################
#
### echo %%% FFTW3 Support - Third party libraries
#
# (See http://www.fftw.org)
#
Fons Rademakers
committed
# If the user has set the flags "--disable-fftw3", we don't check for
# FFTW3 at all.
#
if test ! "x$enable_fftw3" = "xno"; then
# Check for FFTW3 include and library
check_header "fftw3.h" "$fftw3incdir" $FFTW3 $FFTW3/include \
$FFTW3/api /usr/local/include /usr/include /opt/fftw3/include \
$finkdir/include
Fons Rademakers
committed
check_library "libfftw3 libfftw3-3" "$enable_shared" "$fftw3libdir" \
$FFTW3 $FFTW3/lib $FFTW3/.libs /usr/local/lib /usr/lib /opt/fftw3/lib \
$finkdir/lib
fftw3lib=$found_lib
fftw3libdir=$found_dir
if test "x$fftw3incdir" = "x" || test "x$fftw3lib" = "x"; then
enable_fftw3="no"
fi
fi
check_explicit "$enable_fftw3" "$enable_fftw3_explicit" \
"Explicitly required FFT in the West dependencies not fulfilled"
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
if test "x$pythia6uscore" = "xDOUBLE" || \
test "x$pythia6uscore" = "xSINGLE" || \
test "x$pythia6uscore" = "xNO" ; then
pythia6cppflags=-DPYTHIA6_${pythia6uscore}_UNDERSCORE
pythia6lib=
pythia6dir=
result "Using custom pythia6 library with $pythia6uscore underscore"
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
if test "x$pythia6lib" = "x" ; then
enable_pythia6=no
if test $found_symbol -eq 1 ; then
pythia6cppflags=-DPYTHIA6_DOUBLE_UNDERSCORE
"$found_lib" "$found_dir"
if test $found_symbol -eq 1 ; then
check_symbol pythia6_common_address \
"$found_lib" "$found_dir"
if test $found_symbol -eq 1 ; then
pythia6cppflags=-DPYTHIA6_NO_UNDERSCORE
else
result " didn't find pythia6_common_block_address[_]* in $found_lib"
enable_pythia6=no
fi
if test "x$platform" = "xmacosx" ; then
check_symbol intel_cpu_indicator "$found_lib" "$found_dir"
if test $found_symbol -eq 1 ; then
pythia6lib="$pythia6lib -L`$cwhich ifort | sed -e 's|bin/ifort|lib|'` -lifcore -lirc -limf"
fi
fi
Fons Rademakers
committed
fi
Fons Rademakers
committed
fi
check_explicit "$enable_pythia6" "$enable_pythia6_explicit" \
"Explicitly required Pythia6 dependencies not fulfilled"
######################################################################
#
### echo %%% Pythia8 Usage - Third party libraries
#
# (See http://root.cern.ch and Lund)
#
# Check for libpythia8
#
if test ! "x$enable_pythia8" = "xno" ; then
# Check for PYTHIA8 include and library
check_header "Pythia.h" "$pythia8incdir" $PYTHIA8 $PYTHIA8/include \
/opt/pythia8/include /usr/local/include /usr/include
pythia8incdir=$found_dir
check_library "libpythia8" "$enable_shared" "$pythia8libdir" \
$PYTHIA8 $PYTHIA8/lib /opt/pythia8/lib /usr/local/lib /usr/lib
pythia8lib=$found_lib
pythia8libdir=$found_dir
if test "x$pythia8incdir" = "x" || test "x$pythia8lib" = "x"; then
enable_pythia8=no
fi
fi
check_explicit "$enable_pythia8" "$enable_pythia8_explicit" \
"Explicitly required Pythia8 dependencies not fulfilled"
######################################################################
#
### echo %%% dCache Support - Third party libraries
#
# (See http://www.dcache.org)
#
# Check for libdcap
#
if test ! "x$enable_dcache" = "xno" ; then
check_header "dcap.h" "$dcapincdir" $DCACHE $DCACHE/include \
/opt/d-cache/dcap/include /products/dcache/include \
/opt/dcache/include /usr/include /usr/local/include
dcapincdir=$found_dir
check_library "libdcap" "$enable_shared" "$dcaplibdir" $DCACHE $DCACHE/lib \
/opt/d-cache/dcap/lib /products/dcache/lib /opt/dcache/lib \
/usr/lib /usr/local/lib
dcaplib=$found_lib
dcaplibdir=$found_dir
if test ! "x$dcaplib" = "x" ; then
check_symbol dc_lseek64 "$dcaplib" "$dcaplibdir"
if test $found_symbol -eq 0 ; then
result "### Need dc_lseek64 in libdcap, upgrade your d-cache client library"
dcaplib=
dcaplibdir=
dcapincdir=
fi
fi
if test "x$dcapincdir" = "x" || test "x$dcaplib" = "x"; then
enable_dcache="no"
fi
fi
check_explicit "$enable_dcache" "$enable_dcache_explicit" \
"Explicitly required dCache dependencies not fulfilled"
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
######################################################################
#
### echo %%% Chirp Support - Third party libraries
#
# (See http://www.cs.wisc.edu/condor/chirp)
#
# Check for libchirp_client
#
if test ! "x$enable_chirp" = "xno" ; then
check_header "chirp_client.h" "$chirpincdir" $CHIRP $CHIRP/include \
/opt/chirp/include /usr/include /usr/local/include
chirpincdir=$found_dir
#At this time, libchirp_client.a should always be prefered over .so,
#to avoid problems with linkage on grid execute machines.
check_library "libchirp_client" "no" "$chirplibdir" $CHIRP $CHIRP/lib \
/opt/chirp/lib /usr/lib /usr/local/lib
chirplib=$found_lib
chirplibdir=$found_dir
if test "x$chirpincdir" = "x" || test "x$chirplib" = "x"; then
enable_chirp="no"
fi
fi
check_explicit "$enable_chirp" "$enable_chirp_explicit" \
"Explicitly required Chirp dependencies not fulfilled"
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
######################################################################
#
### echo %%% gLite Support - Third party libraries
#
# (See https://subversion.gsi.de/trac/dgrid/wiki)
#
# Check for libglite-api-wrapper
#
if test ! "x$enable_glite" = "xno" ; then
check_library "libglite-api-wrapper" "$enable_shared" "$glitelibdir" \
$GAW_LOCATION $GLITE $GLITE/lib ~/GAW/lib /usr/local/lib /usr/lib
glitelib=$found_lib
glitelibdir=$found_dir
gaw_cppflags="${GAW_CPPFLAGS}"
if test "x$glitelib" = "x"; then
enable_glite="no"
fi
fi
check_explicit "$enable_glite" "$enable_glite_explicit" \
"Explicitly required gLite dependencies not fulfilled"
######################################################################
#
### echo %%% AliEn Support - Third party libraries
#
# (See http://alien.cern.ch)
#
#
if test ! "x$enable_alien" = "xno" ; then
check_header "gapiUI.h" "$alienincdir" $ALIEN $ALIEN/include \
/opt/alien/api/include /usr/local/alien/api/include /usr/include \
/usr/local/include
alienincdir=$found_dir
check_library "libgapiUI" "$enable_shared" "$alienlibdir" \
$ALIEN $ALIEN/lib /opt/alien/api/lib /usr/local/alien/api/lib /usr/lib \
/usr/local/lib
alienlib=$found_lib
alienlibdir=$found_dir
if test "x$alienincdir" = "x" || test "x$alienlib" = "x"; then
enable_alien="no"
fi
fi
check_explicit "$enable_alien" "$enable_alien_explicit" \
"Explicitly required AliEn dependencies not fulfilled"
######################################################################
#
### echo %%% AfterImage Support - Third party libraries
#
# (See http://afterstep.sourceforge.net/afterimage/)
#
# Check for graphics libraries used by libAfterImage, like libjpeg, etc.
#
if test ! "x$enable_asimage" = "xno" ; then
# Currently our libAfterImage is completely out of sync with the official
# libAfterImage due to many new features, use always the builtin_afterimage
if test "x$enable_builtin_afterimage" = "xno" ||
test "x$enable_builtin_afterimage" = "x" ; then
# Assume failure
enable_builtin_afterimage="yes"
checking_msg "afterimage-config"
if `$cwhich afterimage-config > /dev/null 2>&1` ; then
$cwhich afterimage-config
# we found afterimage-config - now check the version number
asimage_version=`afterimage-config --version | awk 'BEGIN { FS="." } { printf "%d", $1 * 1000 + $2 }'`
#if test $asimage_version -gt 1003 ; then
if test $asimage_version -gt 0 ; then
result "WARNING: System libAfterImage is too new, using built-in"
else
enable_builtin_afterimage="no"
asextralib=`afterimage-config --libs`
asimageincdir=`afterimage-config --cflags | sed 's/-I//g'`
fi
else
# If we didn't find the system libAfterImage, or the user didn't ask
# for a system library, then see if we have various headers needed.
if test "x$enable_builtin_afterimage" = "xyes" ; then
check_header "jpeglib.h" "" $ASIMAGE $ASIMAGE/include \
/usr/local/include /usr/include /opt/include
check_header "png.h" "" $ASIMAGE $ASIMAGE/include $ASPNG/include \
/usr/local/include /usr/include /usr/local/include/libpng \
/opt/include
Fons Rademakers
committed
if test ! "x$enable_astiff" = "xno" ; then
check_header "tiffio.h" "" $ASIMAGE $ASIMAGE/include \
/usr/local/include /usr/include /opt/include
astiffincdir=$found_dir
else
astiffincdir="--with-tiff=no"
fi
check_header "gif_lib.h" "" $ASIMAGE $ASIMAGE/include \
/usr/local/include /usr/include /opt/include
asgifincdir=$found_dir
asextralib=""
asextralibdir=""
found_libz=""
found_dirz=""
# libz must be before libpng, if libz is not found don't
# add libpng which needs libz
# note that failure to find system libungif is not fatal since
# libAfterImage contains embedded libungif source if needed
Fons Rademakers
committed
if test ! "x$enable_astiff" = "xno" ; then
Fons Rademakers
committed
else
Fons Rademakers
committed
fi
for k in $aslibs ; do
$ASIMAGE $ASIMAGE/lib $ASPNG/lib /usr/local/lib /usr/lib /opt/lib
if test "x$k" = "xlibz" ; then
found_libz=$found_lib
found_dirz=$found_dir
continue;
fi
if test "x$k" = "xlibpng" && test "x$found_libz" = "x" ; then
break;
fi
if test "x$k" = "xlibungif" && test "x$found_lib" = "x" ; then
asgifincdir=""
fi
if test ! "x$found_lib" = "x" ; then
asextralib="$asextralib $found_lib"
asextralibdir="$asextralibdir $found_dir"
fi
done
if test "x$asextralib" = "x" ; then
asextralib=""
asextralibdir=""
asjpegincdir=""
aspngincdir=""
astiffincdir=""
asgifincdir=""
else
asextralib="$asextralib $found_libz"
asextralibdir="$asextralibdir $found_dirz"
fi
fi
message "Checking whether to build included libAfterImage"
check_explicit "$enable_asimage" "$enable_asimage_explicit" \
"Explicitly required AfterImage dependencies not fulfilled"
######################################################################
#
### echo %%% LDAP Support - Third party libraries
#
# (See openldap.org)
#
# If the user has set the flags "--disable-ldap", we don't check for
# LDAP at all.
#
if test ! "x$enable_ldap" = "xno"; then
# Check for ldap include and library
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
check_header "ldap.h" "$ldapincdir" $LDAP $LDAP/include \
/usr/include /usr/local/include /usr/local/ldap/include \
/usr/include/ldap /usr/include/openldap /usr/ldap/include \
/usr/local/include/ldap /usr/local/include/openldap \
/usr/ldap /usr/local/ldap /opt/ldap /opt/ldap/include
ldapinc=$found_hdr
ldapincdir=$found_dir
ldaplib=""
ldaplibdir=""
for i in libldap liblber ; do
check_library $i "$enable_shared" "" $ldaplibdir \
$LDAP $LDAP/lib /usr/local/ldap/lib /usr/local/lib \
/usr/lib/ldap /usr/local/lib/ldap /usr/ldap/lib /usr/lib \
/usr/ldap /usr/local/ldap /opt/ldap /opt/ldap/lib
if test "x$found_lib" = "x" ; then
ldaplib=""
ldaplibdir=""
enable_ldap="no"
break
fi
ldaplib="$ldaplib $found_lib"
ldaplibdir="$ldaplibdir $found_dir"
done
if test "x$ldapincdir" = "x" || test "x$ldaplib" = "x"; then
enable_ldap="no"
fi
fi
check_explicit "$enable_ldap" "$enable_ldap_explicit" \
"Explicitly required LDAP dependencies not fulfilled"
######################################################################
#
### echo %%% Python - Optional alternative interpreter
#
# (See http://www.python.org)
#
if test ! "x$enable_python" = "xno" ; then
# Check for Python include and library
mypython=`$cwhich python 2> /dev/null`
if test ! "x$mypython" = "x" && test -x "$mypython" ; then
pythonvers=`python -c 'import sys; print sys.version[:3]'`
pythonsysincdir=`python -c 'import sys;print sys.prefix + "/include/python" + sys.version[:3]'`
pythonsyslibdir=`python -c 'import sys; print sys.prefix + "/lib/python" + sys.version[:3]'`
pythonsyslibdir2=
if test "x$platform" = "xmacosx"; then
pythonsyslibdir2=`python -c 'import sys; print sys.prefix'`
fi
check_header "Python.h" "$pythonincdir" $PYTHONDIR $PYTHONDIR/include \
$PYTHONDIR/include/python $pythonsysincdir
pythoninc=$found_hdr
pythonincdir=$found_dir
pythonvers=`python -c 'import sys; print sys.version[:3].replace(".","")' | tr -d '\r'`
if test ! "x$pythonincdir" = "x" ; then
pythonincdir=`cygpath -m $pythonincdir`
fi
fi
check_library "python${pythonvers} libpython${pythonvers} \
libpython python Python" \
"$enable_shared" "$pythonlibdir" $PYTHONDIR/libs $PYTHONDIR/lib \
$PYTHONDIR $pythonsyslibdir $pythonsyslibdir/config \
$pythonsyslibdir2
pythonlib=$found_lib
pythonlibdir=$found_dir
if test "x$pythonincdir" = "x" || test "x$pythonlib" = "x"; then
enable_python="no"
else
pythonlibflags=
case $platform in
win32) pythonlibflags="-nodefaultlib:`basename $pythonlib`" ;;
esac
check_explicit "$enable_python" "$enable_python_explicit" \
"Explicitly required Python dependencies not fulfilled"
######################################################################
#
### echo %%% Ruby - Optional alternative interpreter
#
# (See http://www.ruby-lang.org)
#
if test ! "x$enable_ruby" = "xno" ; then
# Check for Ruby include and library
myruby=`$cwhich ruby 2> /dev/null`
if test ! "x$myruby" = "x" && test -x "$myruby" ; then
rubysysincdir=`ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]'`
rubysyslibdir=`ruby -rrbconfig -e 'puts Config::CONFIG["libdir"]'`
fi
rubysysincdir2=
if test "x$platform" = "xmacosx" ; then
rubysysincdir2=`echo $rubysysincdir | sed -e 's/powerpc/universal/'`
fi
Fons Rademakers
committed
check_header "ruby.h" "$rubyincdir" $RUBYDIR $RUBYDIR/include \
rubyinc=$found_hdr
rubyincdir=$found_dir
if test "x$arch" = "xwin32" || \
test "x$enable_shared" = "xno" ; then
check_library_options="libruby-static libruby1.8-static libruby1.9-static"
check_library_options="libruby libruby1.8 libruby18 libruby1.9 libruby19"
check_library "$check_library_options" \
Fons Rademakers
committed
"$enable_shared" "$rubylibdir" $RUBYDIR $RUBYDIR/lib \
$rubysyslibdir
rubylib=$found_lib
rubylibdir=$found_dir
if test "x$rubyincdir" = "x" || test "x$rubylib" = "x"; then
enable_ruby="no"
else
# Ruby support requires the explicitlink option
enable_explicitlink="yes"
fi
fi
check_explicit "$enable_ruby" "$enable_ruby_explicit" \
"Explicitly required Ruby dependencies not fulfilled"
######################################################################
#
### echo %%% xml - the XML parser interface
#
# (See http://www.xmlsoft.org)
#
# If the user has set the flags "--disable-xml", we don't check for
# XML at all.
#
if test ! "x$enable_xml" = "xno" ; then
# Check for xml include and library
Fons Rademakers
committed
if test "x$platform" = "xmacosx"; then
# prefer native libxml2 over the one in Fink (/sw)
PATH=/usr/bin:$PATH
fi
checking_msg "xml2-config"
xml2_config=`$cwhich xml2-config 2> /dev/null`
if test ! "x$xml2_config" = "x" && test -x "$xml2_config" && \
test ! "x$platform" = "xwin32" ; then
$cwhich xml2-config
# we found xml2-config - now check the version number
message "Checking for libxml2 version >= 2.4.x"
xml2_version=`xml2-config --version | awk 'BEGIN { FS="." } { printf "%d", $1 * 1000 + $2 }'`
if test $xml2_version -lt 2004 ; then
enable_xml="no"
else
xmllib=`xml2-config --libs`
xmlincdir=`xml2-config --cflags | sed 's/-I//g'`
fi
else
# fall back in case xml2-config is not found
keepincdir=$xmlincdir
check_header "libxml/tree.h" "$xmlincdir" $XMLDIR $XMLDIR/include \
/opt/libxml2/include /usr/local/include/libxml2 /usr/include/libxml2
xmlincdir=$found_dir
keeplibdir=$xmllibdir
check_library "libxml2_a libxml2" "$enable_shared" "$xmllibdir" $XMLDIR \
$XMLDIR/lib $XMLDIR/.libs /opt/libxml2/lib /usr/local/lib /usr/lib
xmllib=$found_lib
xmllibdir=$found_dir
if test "x$platform" = "xwin32"; then
check_header "iconv.h" "$keepincdir" $ICONVDIR $ICONVDIR/include \
$XMLDIR $XMLDIR/include \
/opt/libxml2/include /usr/local/include/libxml2 /usr/include/libxml2
iconvincdir=$found_dir
check_library "iconv_a" "$enable_shared" "$keeplibdir" $ICONVDIR \
$ICONVDIR/lib $XMLDIR $XMLDIR/lib $XMLDIR/.libs \
/opt/libxml2/lib /usr/local/lib /usr/lib
iconvlib=$found_lib
iconvlibdir=$found_dir
else
iconvincdir=$xmlincdir
iconvlib="-liconv"
fi
if test "x$xmlincdir" = "x" || test "x$xmllib" = "x" ||