Skip to content
Snippets Groups Projects
Commit 3313f5ef authored by Fons Rademakers's avatar Fons Rademakers
Browse files

From Christian Holm:

Patch to configure in which I fixed the problem about building the Debian
packages on ia64, and a mistype that prevented Clarens from being build
on Debian. Also, I changed the `check_symbol' function. First of all, it
would always fail if the library was in `/usr/lib' as that was never
prepended to the file name. Secondly, it would always fail if you had a
stripped shared library, which is the common thing if the library is in
`/usr/lib'. I introduced a test that uses the compiler/linker (via
`config/Makefile.<arch>') to do a simple test program that calls the
specified function, and then tries to link to the specified library.
If that succeeds, the test succeeds. Note, this is more or less what
Autoconf does for you.
Plus added the template `build/misc/html.C.in' which will generate
`macros/html.C' according to the optional packages that were built.


git-svn-id: http://root.cern.ch/svn/root/trunk@11550 27541ba8-7e3a-0410-8455-c3a389f83636
parent ca397784
No related branches found
No related tags found
No related merge requests found
// -*- mode: C++ -*-
Bool_t enable_afs = @enable_afs@;
Bool_t enable_alien = @enable_alien@;
Bool_t enable_asimage = @enable_asimage@;
Bool_t enable_cern = @enable_cern@;
Bool_t enable_chirp = @enable_chirp@;
Bool_t enable_clarens = @enable_clarens@;
Bool_t enable_dcache = @enable_dcache@;
Bool_t enable_globus = @enable_globus@;
Bool_t enable_krb5 = @enable_krb5@;
Bool_t enable_ldap = @enable_ldap@;
Bool_t enable_mysql = @enable_mysql@;
Bool_t enable_opengl = @enable_opengl@;
Bool_t enable_oracle = @enable_oracle@;
Bool_t enable_peac = @enable_peac@;
Bool_t enable_pgsql = @enable_pgsql@;
Bool_t enable_pythia = @enable_pythia@;
Bool_t enable_pythia6 = @enable_pythia6@;
Bool_t enable_python = @enable_python@;
Bool_t enable_qt = @enable_qt@;
Bool_t enable_ruby = @enable_ruby@;
Bool_t enable_rfio = @enable_rfio@;
Bool_t enable_sapdb = @enable_sapdb@;
Bool_t enable_srp = @enable_srp@;
Bool_t enable_ssl = @enable_ssl@;
Bool_t enable_table = @enable_table@;
Bool_t enable_thread = @enable_thread@;
Bool_t enable_venus = @enable_venus@;
Bool_t enable_xml = @enable_xml@;
Bool_t enable_xrootd = @enable_xrootd@;
void html()
{
gSystem->Load("libEG");
gSystem->Load("libFumili.so");
gSystem->Load("libGX11.so");
gSystem->Load("libGX11TTF.so");
gSystem->Load("libGed.so");
gSystem->Load("libGedOld.so");
gSystem->Load("libGeom.so");
gSystem->Load("libGeomPainter.so");
gSystem->Load("libGpad.so");
gSystem->Load("libGraf.so");
gSystem->Load("libGraf3d.so");
gSystem->Load("libGui.so");
gSystem->Load("libGuiBld.so");
gSystem->Load("libHist");
gSystem->Load("libHist.so");
gSystem->Load("libHistPainter");
gSystem->Load("libHtml.so");
gSystem->Load("libMLP.so");
gSystem->Load("libMatrix.so");
gSystem->Load("libMinuit.so");
gSystem->Load("libNew.so");
gSystem->Load("libPhysics");
gSystem->Load("libPostscript.so");
gSystem->Load("libProof");
gSystem->Load("libQuadp.so");
gSystem->Load("libRGL");
gSystem->Load("libRint.so");
gSystem->Load("libSrvAuth.so");
gSystem->Load("libThread");
gSystem->Load("libTree.so");
gSystem->Load("libTreePlayer");
gSystem->Load("libTreeViewer");
gSystem->Load("libTreeViewer.so");
gSystem->Load("libVMC.so");
gSystem->Load("libX3d");
gSystem->Load("libX3d.so");
gSystem->Load("libXMLIO.so");
if (enable_alien) gSystem->Load("libRAliEn");
if (enable_asimage) gSystem->Load("libASImage");
if (enable_cern) gSystem->Load("libHbook");
if (enable_chirp) gSystem->Load("libChirp");
if (enable_clarens) {
gSystem->Load("libClarens");
if (enable_peac) {
gSystem->Load("libPeacGui");
gSystem->Load("libPeac");
}
}
if (enable_dcache) gSystem->Load("libDCache");
if (enable_globus) gSystem->Load("libGlobusAuth");
if (enable_krb5) gSystem->Load("libKrb5Auth");
if (enable_ldap) gSystem->Load("libRLDAP");
if (enable_mysql) gSystem->Load("libMySQL");
if (enable_opengl) gSystem->Load("libRGL");
if (enable_oracle) gSystem->Load("libOracle");
if (enable_pgsql) gSystem->Load("libPgSQL");
if (enable_pythia) gSystem->Load("libEGPythia");
if (enable_pythia6) gSystem->Load("libEGPythia6");
if (enable_python) gSystem->Load("libPyROOT");
if (enable_qt) {
gSystem->Load("libGQt");
gSystem->Load("libQtRoot");
}
if (enable_ruby) gSystem->Load("libRuby");
if (enable_rfio) gSystem->Load("libRFIO");
if (enable_sapdb) gSystem->Load("libSapDB");
if (enable_srp) gSystem->Load("libSRPAuth");
if (enable_table) gSystem->Load("libTable");
if (enable_thread) gSystem->Load("libThread");
if (enable_venus) gSystem->Load("libEGVenus");
if (enable_xml) gSystem->Load("libXMLParser");
if (enable_xrootd) {
gSystem->Load("libNetx.so");
gSystem->Load("libXrdOfs");
gSystem->Load("libXrdRootd");
gSystem->Load("libXrdSec.so");
if (enable_krb5) {
gSystem->Load("libXrdSeckrb4");
gSystem->Load("libXrdSeckrb5");
}
}
THtml html;
html.MakeAll();
}
...@@ -423,29 +423,63 @@ check_symbol() { ...@@ -423,29 +423,63 @@ check_symbol() {
# Check if we got a specific argument as to where the library # Check if we got a specific argument as to where the library
# is to be found # is to be found
symbolfile=$symbollib symbolfile=$symbollib
if test ! "x$symboldir" = "x" ; then exts=".so .lib"
symbolfile=$symboldir/$symbollib if test ! "x$shared" = "xno" ; then
if test ! -r $symbolfile ; then exts="$exts .a"
for i in .a .so .lib ; do else
if test -r $symbolfile$i ; then exts=".a $exts"
symbolfile=$symbolfile$i fi
break for d in "$symboldir" /usr/lib ; do
if test ! -r $d/$symbollib ; then
for i in $exts ; do
if test -r $d/$symbollib$i ; then
symbolfile=$d/$symbollib$i
break 2
fi fi
done done
fi fi
fi done
if test "x$symbolfile" = "x" || test ! -r $symbolfile ; then if test "x$symbolfile" = "x" || test ! -r $symbolfile ; then
found_symbol=0 found_symbol=0
return 1 return 1
fi fi
checking_msg "$symbol in $symbolfile"
symbol_in_lib=`nm $symbolfile 2> /dev/stdout | grep $symbol > /dev/null 2>&1` symbol_in_lib=`nm $symbolfile 2> /dev/stdout | grep $symbol > /dev/null 2>&1`
if test $? -eq 0 ; then if test $? -eq 0 ; then
found_symbol=1 found_symbol=1
else else
nm $symbolfile 2> /dev/stdout | grep "no symbols" > /dev/null 2>&1
if test $? -eq 0 ; then
# stripped library - only safe test is to link against the
# library! However, we do not know what compiler to use
# so we can not do the test. Assume the symbol is in
cat <<EOF > conftest.mk
include config/Makefile.${arch}
conftest:conftest.c $symbolfile
\$(CC) \$(CFLAGS) \$(LDFLAGS) $symbolfile \$< -o \$@
conftest.c:
echo "extern int $symbol (); " > \$@
echo "int main() { $symbol (); return 0; }" >> \$@
EOF
$gnumake -f conftest.mk > /dev/null 2>&1
rm -rf conftest.c conftest.mk conftest
if test $? -eq 0 ; then
found_symbol=1
else
found_symbol=0 found_symbol=0
fi fi
else
found_symbol=0
fi
fi
if test $found_symbol -eq 1 ; then
echo "ok"
else
echo "no"
fi
} }
#_____________________________________________________________________ #_____________________________________________________________________
...@@ -517,6 +551,10 @@ MIMEWIN32IN=config/mimes.win32.in ...@@ -517,6 +551,10 @@ MIMEWIN32IN=config/mimes.win32.in
MIMEOUT=etc/root.mimes MIMEOUT=etc/root.mimes
ROOTDIN=config/rootd.in ROOTDIN=config/rootd.in
ROOTDOUT=etc/rootd ROOTDOUT=etc/rootd
ROOTHELPIN=config/root-help.el.in
ROOTHELPOUT=build/misc/root-help.el
HTMLIN=config/html.C.in
HTMLOUT=macros/html.C
###################################################################### ######################################################################
# #
...@@ -726,6 +764,13 @@ hpuxia64acc) ...@@ -726,6 +764,13 @@ hpuxia64acc)
checkhpux64="yes" ;; checkhpux64="yes" ;;
esac esac
case $platform in
win32|linux|macosx)
gnumake="make" ;;
*)
gnumake="gmake" ;;
esac
if test "x$platform" = "xmacosx" ; then if test "x$platform" = "xmacosx" ; then
finkdir=`which fink 2>&1 | sed -ne "s/\/bin\/fink//p"` finkdir=`which fink 2>&1 | sed -ne "s/\/bin\/fink//p"`
fi fi
...@@ -736,7 +781,7 @@ fi ...@@ -736,7 +781,7 @@ fi
# #
trap "rm -f Makefile.tmp config.tmp root-config.tmp rootrc.tmp \ trap "rm -f Makefile.tmp config.tmp root-config.tmp rootrc.tmp \
rootauthrc.tmp rootdaemonrc.tmp memprobe.tmp rootd.tmp \ rootauthrc.tmp rootdaemonrc.tmp memprobe.tmp rootd.tmp \
conftest.c conftest; exit 1" 1 2 3 15 conftest.mk conftest.c conftest; exit 1" 1 2 3 15
###################################################################### ######################################################################
# #
...@@ -2640,7 +2685,7 @@ if test ! "x$enable_clarens" = "xno" ; then ...@@ -2640,7 +2685,7 @@ if test ! "x$enable_clarens" = "xno" ; then
clarenslibs=`xmlrpc-c-config curl-client --ldadd 2> /dev/null` clarenslibs=`xmlrpc-c-config curl-client --ldadd 2> /dev/null`
if test "x$clarensincdir" = "x" ; then if test "x$clarensincdir" = "x" ; then
clarensincdir=`xmlrpc-c-config --cflags 2> /dev/null` clarensincdir=`xmlrpc-c-config --cflags 2> /dev/null`
clarenslibdir=`xmlrpc-c-config --ldadd 2> /dev/null` clarenslibs=`xmlrpc-c-config --ldadd 2> /dev/null`
fi fi
else else
clarensincdir="" clarensincdir=""
...@@ -2714,9 +2759,9 @@ if test "x$show_pkglist" = "xyes" ; then ...@@ -2714,9 +2759,9 @@ if test "x$show_pkglist" = "xyes" ; then
test "x$enable_srp" = "xyes" && pkglist="$pkglist root-plugin-srp" test "x$enable_srp" = "xyes" && pkglist="$pkglist root-plugin-srp"
test "x$enable_venus" = "xyes" && pkglist="$pkglist root-plugin-venus" test "x$enable_venus" = "xyes" && pkglist="$pkglist root-plugin-venus"
test "x$enable_xml" = "xyes" && pkglist="$pkglist root-plugin-xml" test "x$enable_xml" = "xyes" && pkglist="$pkglist root-plugin-xml"
test "x$enable_xrootd" = "xyes" && pkglist="$pkglist root-xrootd" test "x$enable_xrootd" = "xyes" && pkglist="$pkglist root-xrootd root-plugin-netx"
pkglist="$pkglist root-plugin-fumili root-plugin-minuit root-plugin-mlp root-plugin-netx root-plugin-proof root-proofd root-plugin-quadp root-rootd root-cint root-doc libroot-dev root-bin libroot ttf-root ttf-root-installer" pkglist="$pkglist root-plugin-fumili root-plugin-minuit root-plugin-mlp root-plugin-proof root-proofd root-plugin-quadp root-rootd root-cint root-doc libroot-dev root-bin libroot ttf-root ttf-root-installer"
# If we're called from the package preparation script, then # If we're called from the package preparation script, then
# print out the package list and exit # print out the package list and exit
echo "packages: $pkglist" echo "packages: $pkglist"
...@@ -3212,12 +3257,32 @@ echo "done" ...@@ -3212,12 +3257,32 @@ echo "done"
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# build/misc/root-help.el # build/misc/root-help.el
# #
message "Writing build/misc/root-help.el" message "Writing $ROOTHELPOUT"
sed -e "s|@bindir@|$bindir|" \ sed -e "s|@bindir@|$bindir|" \
-e "s|@incdir@|$incdir|" \ -e "s|@incdir@|$incdir|" \
< config/root-help.el.in > build/misc/root-help.el < $ROOTHELPIN > $ROOTHELPOUT
echo "done" echo "done"
#---------------------------------------------------------------------
# macros/html.C
#
message "Writing $HTMLOUT"
sed_args=
i=0
for opt in $options; do
sed_args="${sed_args} -e s/@$opt@/"
if eval "test x$`eval echo $opt` = xyes"; then
sed_args="${sed_args}kTRUE"
else
sed_args="${sed_args}kFALSE"
fi
sed_args="${sed_args}/g"
# if test $i -eq 0 ; then break ; fi
let i=$i+1
done
sed $sed_args < $HTMLIN > $HTMLOUT
echo done
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# config.status # config.status
# #
...@@ -3293,17 +3358,9 @@ fi ...@@ -3293,17 +3358,9 @@ fi
echo "To build ROOT type:" echo "To build ROOT type:"
echo "" echo ""
if test "x$platform" = "xwin32" || test "x$platform" = "xlinux" || echo " $gnumake"
test "x$platform" = "xmacosx" ; then if test ! "x$haveconfig" = "x" ; then
echo " make" echo " $gnumake install"
if test ! "x$haveconfig" = "x" ; then
echo " make install"
fi
else
echo " gmake"
if test ! "x$haveconfig" = "x" ; then
echo " gmake install"
fi
fi fi
echo "" echo ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment