https://github.com/root-project/root
Tip revision: c0cd40d982ef10ef69b84d71633db1c18215c1b4 authored by Unknown Author on 06 February 2002, 11:51:07 UTC
This commit was manufactured by cvs2svn to create tag 'v3-00-06'.
This commit was manufactured by cvs2svn to create tag 'v3-00-06'.
Tip revision: c0cd40d
root-config.in
#!/bin/sh
# This script returns the machine dependent compile options needed
# to compile and link applications using the ROOT libraries.
#
# Author: Fons Rademakers, 06/06/99
arch=@architecture@
libdir=@libdir@
incdir=@incdir@
if test "$arch" = "win32"; then
incdir=`cygpath -u $incdir`
libdir=`cygpath -u $libdir`
fi
### ROOT libraries ###
newlib="-lNew"
rootlibs="-lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint \
-lPostscript -lMatrix -lPhysics"
rootglibs="-lGui"
### machine dependent settings ###
case $arch in
hpux)
#HP-UX with CC
auxcflags="+a1 +Z"
auxlibs="-lm -ldld"
auxglibs=${auxlibs}
;;
hpuxacc)
# HP-UX 10.x with aCC
auxcflags="+W823"
auxlibs="-lm -ldld"
auxglibs=${auxlibs}
;;
hpuxegcs)
# HP-UX 10.x with g++
auxcflags=
auxlibs="-lm -ldld"
auxglibs=${auxlibs}
;;
aix)
# IBM AIX
auxcflags="-qnoro -qnoroconst -qmaxmem=-1"
auxlibs=
auxglibs=${auxlibs}
;;
aixegcs)
# IBM AIX with g++
auxcflags="-fsigned-char"
auxlibs=
auxglibs=${auxlibs}
;;
solaris)
# Solaris
auxcflags=
auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl -lsunmath"
auxglibs=${auxlibs}
;;
solarisegcs)
# Solaris egcs
auxcflags=
auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl"
auxglibs=${auxlibs}
;;
solarisgcc)
# Solaris g++ 2.8.x
auxcflags=
auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl"
auxglibs=${auxlibs}
;;
solarisCC5)
# Solaris CC 5.0
auxcflags=
auxlibs="-lm -ldl -lnsl -lsocket"
auxglibs=${auxlibs}
;;
solariskcc)
# Solaris KCC
auxcflags=
auxlibs="-L/usr/ccs/lib -lgen -lm -ldl -lsocket -lnsl"
auxglibs=${auxlibs}
;;
solarisx86)
# Solaris CC on Intel
auxcflags=
auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl"
auxglibs=${auxlibs}
;;
sgicc)
# SGI
auxcflags="-LANG:std"
auxlibs="-lm -ldl"
auxglibs=${auxlibs}
;;
sgiegcs)
# SGI 6.x with EGCS
auxcflags="-fsigned-char"
auxlibs="-lgen -lstdc++ -lm -ldl"
auxglibs=${auxlibs}
;;
sgin32egcs)
# SGI 6.x with EGCS with n32 ABI
auxcflags="-fsigned-char"
auxlibs="-lm -ldl"
auxglibs=${auxlibs}
;;
sgikcc)
# SGI with KCC
auxcflags="--signed_chars --display_error_number \
--diag_suppress 68 --diag_suppress 191 --diag_suppress 837"
auxlibs="-lm -ldl"
auxglibs=${auxlibs}
;;
alphagcc)
# Alpha/OSF with g++
auxcflags=
auxlibs="-lg++ -lm"
auxglibs=${auxlibs}
;;
alphaegcs)
# Alpha/OSF with egcs
auxcflags="-mcpu=ev5 -D__osf__ -D__alpha"
auxlibs="-ltermcap -lm"
auxglibs=${auxlibs}
;;
alphakcc)
# Alpha/OSF with kai compiler (not yet valid)
auxcflags="-mcpu=ev5 -D__osf__ -D__alpha"
auxlibs="-ltermcap -lm"
auxglibs=${auxlibs}
;;
alphacxx6)
# Alpha/OSF with cxx6
auxcflags="-nostdnew -D__osf__ -D__alpha"
auxlibs="-lm"
auxglibs=${auxlibs}
;;
alphacxx)
# Alpha/OSF with cxx5
auxcflags="-oldcxx -D__osf__ -D__alpha"
auxlibs="-lm"
auxglibs=${auxlibs}
;;
linux|linuxrh42)
# Linux with gcc 2.7.2.x
auxcflags=
auxlibs="-lg++ -lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
linuxegcs)
# Linux with egcs
auxcflags="-D_REENTRANT"
auxlibs="-lm -ldl -lpthread -rdynamic"
auxglibs=${auxlibs}
;;
linuxdeb|linuxsuse6)
# Linux with egcs on Debian and SuSE
auxcflags=
auxlibs="-lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
linuxdeb2)
# Linux with egcs (Debian 2)
auxcflags=
auxlibs="-lnsl -lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
linuxkcc)
# Linux with the KAI compiler
auxcflags="--signed_chars -D_EXTERN_INLINE=inline --diag_suppress 191"
auxlibs="-lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
linuxppcegcs)
# Linux/ppc with gcc/glibc
auxcflags="-fsigned-char -I/usr/X11/include"
auxlibs="-lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
linuxia64gcc)
# Itanium Linux with gcc 2.9x
auxcflags=
auxlibs="-lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
linuxia64sgi)
# Itanium Linux with SGI compiler
auxcflags=
auxlibs="-lm -ldl"
auxglibs=${auxlibs}
;;
linuxalphaegcs)
# Alpha Linux with egcs
auxcflags=
auxlibs="-lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
mklinux)
# MkLinux with libc5
auxcflags="-fsigned-char -I/usr/X11/include -I/usr/include/g++"
auxlibs="-lg++ -lm -ldl -rdynamic"
auxglibs=${auxlibs}
;;
freebsd)
# FreeBSD with libc5
auxcflags=
auxlibs="-lm -lg++"
auxglibs=${auxlibs}
;;
freebsd4)
# FreeBSD with glibc
auxcflags=
auxlibs="-lm -lstdc++"
auxglibs=${auxlibs}
;;
hiux)
# Hitachi HIUX
auxcflags=
auxlibs="-lm -ldld"
auxglibs=${auxlibs}
;;
win32)
# Win32
auxcflags="-MD"
auxlibs=
auxglibs=${auxlibs}
;;
*)
echo "root-config: \"$arch\" invalid architecture"
echo "Please report to rootdev@root.cern.ch"
exit 1
;;
esac
### end of machine dependent settings ###
prefix=@prefix@
if test "$arch" = "win32"; then
prefix=`cygpath -u ${prefix}`
fi
exec_prefix=${prefix}
exec_prefix_set=no
nonew_set=yes
new_set=no
cflags=""
usage="\
Usage: root-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--new] [--nonew] [--libs] [--glibs]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
if test "$arch" = "win32"; then
optarg=`cygpath -u $optarg`
fi
prefix=$optarg
incdir=${prefix}/include
libdir=${prefix}/lib
if test "$arch" = "win32"; then
incdir=`cygpath -u $incdir`
libdir=`cygpath -u $libdir`
fi
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
if test "$arch" = "win32"; then
optarg=`cygpath -u $optarg`
fi
exec_prefix=$optarg
exec_prefix_set=yes
libdir=${exec_prefix}/lib
if test "$arch" = "win32"; then
libdir=`cygpath -u $libdir`
fi
;;
--exec-prefix)
echo $exec_prefix
;;
--nonew)
nonew_set=yes
;;
--new)
new_set=yes
;;
--version)
if test -r ${incdir}/RVersion.h; then
echo `cat ${incdir}/RVersion.h | sed -e "s/.*ROOT_RELEASE //" \
-e "s/.*#.*$//" -e "s/.*\*.*$//" -e "s/\"//g" -e "/^$/d"`
else
echo "cannot read ${incdir}/RVersion.h"
fi
;;
--cflags)
if test ${incdir} != /usr/include; then
if test "$arch" = "win32"; then
includes=-I\'`cygpath -w ${incdir}`\'
else
includes=-I${incdir}
fi
fi
if test $# -gt 1; then
cflags="${auxcflags} $includes"
else
echo ${auxcflags} $includes
fi
;;
--libs)
if test $new_set = yes; then
libs="${newlib} ${rootlibs}"
else
libs=${rootlibs}
fi
if test "$arch" = "win32"; then
nlibs=`echo $libs | sed "s@-l\([a-zA-Z0-9]*\)@${libdir}/lib\1.lib@g"`
libs=
for i in $nlibs; do
libs="$libs '`cygpath -w $i`'"
done
echo $cflags $libs ${auxlibs}
else
echo $cflags -L${libdir} $libs ${auxlibs}
fi
;;
--glibs)
if test $new_set = yes; then
glibs="${newlib} ${rootlibs} ${rootglibs}"
else
glibs="${rootlibs} ${rootglibs}"
fi
if test "$arch" = "win32"; then
nlibs=`echo $glibs | sed "s@-l\([a-zA-Z0-9]*\)@${libdir}/lib\1.lib@g"`
glibs=
for i in $nlibs; do
glibs="$glibs '`cygpath -w $i`'"
done
echo $cflags $glibs ${auxglibs}
else
echo $cflags -L${libdir} $glibs ${auxglibs}
fi
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done