LISTSERV mailing list manager LISTSERV 16.5

Help for XROOTD-L Archives


XROOTD-L Archives

XROOTD-L Archives


XROOTD-L@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Monospaced Font

LISTSERV Archives

LISTSERV Archives

XROOTD-L Home

XROOTD-L Home

XROOTD-L  August 2004

XROOTD-L August 2004

Subject:

Re: latest ./configure updates

From:

Gerardo Ganis <[log in to unmask]>

Date:

30 Aug 2004 15:50:17 +0200 (CEST)Mon, 30 Aug 2004 15:50:17 +0200 (CEST)

Content-Type:

MULTIPART/MIXED

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (36 lines) , configure (1 lines)



  Hi Pete,

  Sorry, there were some bash specific command not recognized
  using /bin/sh on Solrais (I did try --help only on Linux ...).
  The attached configure should work.

  Gerri

On Mon, 30 Aug 2004, Peter Elmer wrote:

> Hi Gerri,
>
> One small detail, in the latest version it looks like there is a small
> syntax error with:
>
> shire04> ./configure --help
> <...>
> Supported Architectures:
>
> Platform Default Support Description
> flavour
> ./configure: 10: not found
>
> (in reading in config/ARCHS).
>
> Pete
>
> -------------------------------------------------------------------------
> Peter Elmer E-mail: [log in to unmask] Phone: +41 (22) 767-4644
> Address: CERN Division PPE, Bat. 32 2C-14, CH-1211 Geneva 23, Switzerland
> -------------------------------------------------------------------------
>


#! /bin/sh
################################################################################
#
# $Id: configure,v 1.7 2004/08/30 07:16:34 elmer Exp $
# #
# c o n f i g u r e #
# #
# (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University #
# All Rights Reserved. See XrdInfo.cc for complete License Terms #
# Produced by Andrew Hanushevsky for Stanford University under contract #
# DE-AC03-76-SFO0515 with the Department of Energy #
# #
################################################################################
# #
# A simple configure script. #
# #
# Derived from the ROOT configure script written by Christian Holm Christensen #
# and Fons Rademakers. #
# Simplified and adapted for Xrd by G. Ganis #
# #
# 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
show_pkglist=no
noact="no"
nohowto="no"
strlcpy="noidea"
seconly="no"

options=" \
enable_krb4 \
enable_krb5 \
enable_trace \
"

#
# This sets all options to "yes" - we turn off those we don't want
# on per default explictly afterwards.
#
for c in $options ; do eval $c="yes" ; done

enable_thread=yes

#
# ./configure arguments and defaults set via supported env vars
#
envvars="
KRB4DIR \
KRB5DIR \
"
configenvvars=
for c in $envvars ; do
cc=`eval echo "$"$c`
if test ! "x$cc" = "x" ; then
if test ! "x$configenvvars" = "x" ; then
configenvvars="$configenvvars $c=$cc"
else
configenvvars="$c=$cc"
fi
fi
done

configargs="$*"
# don't write --nohowto to config.h
configargs=`echo $configargs|sed 's, *--nohowto,,g'`

configoptions=
if test ! "x$configenvvars" = "x" ; then
configoptions=$configenvvars
fi
if test ! "x$configargs" = "x" ; then
if test ! "x$configoptions" = "x" ; then
configoptions="$configoptions $configargs"
else
configoptions=$configargs
fi
fi

######################################################################
#
### 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 # lib without extension for MacOS X
libs="$libs $i$ext"
done
done
slibs=""
for i in $lib ; do
for ext in .so .sl .dylib .dll.a ; do # .dll.a for cygwin gcc
slibs="$slibs $i$ext"
done
done
if test ! "x$shared" = "xno" ; then
libs="$slibs $libs"
else
libs="$libs $slibs"
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
# look first in the lib32 directories
if test "x$checklib32" = "xyes" ; then
i32=`echo $i | sed 's|lib*|lib32|'`
i="$i32 $i"
fi
# look first in the lib64 directories
if test "x$checklib64" = "xyes" ; then
i64=`echo $i | sed 's|lib*|lib64|'`
i="$i64 $i"
fi
for l in $i ; do
for j in ${libs} ; do
# if we found the file (it's readable by user), we set the
# logical variables and are on our way, otherwise we continue
liblist=`echo $l/$j` # expands wildcard in $l/$j
for n in ${liblist} ; do
if test -f $n ; then
found_dir=$l
found_lib=$j
break 4
fi
done
done
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 # lib without extension for MacOS X
if test "x$found_lib" = "x$i$ext" ; then
flib=$i$ext
fi
done
done
if 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}
# Avoid inclusion of /usr/lib, which is always included anyway
if test "x$found_dir" = "x-L/usr/lib" || \
test "x$found_dir" = "x-L/usr/lib32" || \
test "x$found_dir" = "x-L/usr/lib64" ; then
found_dir=""
fi
fi

fi
unset shared
unset lib
unset flib
unset libdirl
}

#_____________________________________________________________________
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
}

#_____________________________________________________________________
check_symbol() {
# This function will try to locate a symbol [$1] in a specific
# library [$2] and in a given directory [$3].
# The result of the check is stored in found_symbol, 1 if true,
# 0 otherwise, which should be immediately copied, since the variable
# will be overwritten at next invocation of this function.

# Assert that we got enough arguments
if test $# -ne 3 ; then
echo "check_symbol: Not 3 arguments"
return 1
fi

# Save arguments in logical names
symbol=$1 ; shift
symbollib=$1 ; shift
symboldir=$1

# Check if we got a specific argument as to where the library
# is to be found
symbolfile=$symbollib
if test ! "x$symboldir" = "x" ; then
symbolfile=$symboldir/$symbollib
if test ! -r $symbolfile ; then
for i in .a .so .lib ; do
if test -r $symbolfile$i ; then
symbolfile=$symbolfile$i
break
fi
done
fi
fi

if test "x$symbolfile" = "x" || test ! -r $symbolfile ; then
found_symbol=0
return 1
fi

symbol_in_lib=`nm $symbolfile | grep $symbol > /dev/null 2>&1`
if test $? -eq 0 ; then
found_symbol=1
else
found_symbol=0
fi
}

#_____________________________________________________________________
guess_architecture () {
# Try to guess the architecture of the host system
# Note, that there's no attempt at guessing the compiler.
# The `native' compiler is used in all cases.
# If a user really want a specifific compiler, s/he better use the
# first argument to do so.
type=`uname -s`
osys=`uname -s | tr '[A-Z]' '[a-z]'`
chip=`uname -m | tr '[A-Z]' '[a-z]'`
rele=`uname -r`
arch="$osys"
ccflv="gcc"
echo "Guessing architecture/compiler:"
case "$osys:$chip:$rele" in
aix:*:5*) arch=rs_aix5 ; platform=aix; ccflv=xlC;;
osf1*:alpha:*) arch=alphacxx6 ; platform=alpha; ccflv=cxx;;
freebsd*:*:5*) arch=FreeBSD5 ; platform=fbsd; ccflv=gcc;;
freebsd*:*:4.2*) arch=FreeBSD42 ; platform=fbsd; ccflv=gcc;;
freebsd*:*:4.3*) arch=FreeBSD43 ; platform=fbsd; ccflv=gcc;;
freebsd*:*:4.4*) arch=FreeBSD44 ; platform=fbsd; ccflv=gcc;;
freebsd*:*:4*) arch=FreeBSD4 ; platform=fbsd; ccflv=gcc;;
freebsd*:*:*) arch=FreeBSD ; platform=fbsd; ccflv=gcc;;
hp-ux:ia64:*) arch=hpuxia64 ; platform=hpux; ccflv=aCC;;
hurd*:*:*) arch=hurddeb ; platform=linux; ccflv=gcc;;
linux:ia64:2.2*) arch=ia64_linux22 ; platform=linux; ccflv=icc;;
linux:ia64:2.4*) arch=ia64_linux24 ; platform=linux; ccflv=icc;;
linux:ia64:2.6*) arch=ia64_linux26 ; platform=linux; ccflv=icc;;
linux:ia64:*) arch=ia64_linux ; platform=linux; ccflv=icc;;
linux:i*86:2.2*) arch=i386_linux22 ; platform=linux; ccflv=gcc;;
linux:i*86:2.4*) arch=i386_linux24 ; platform=linux; ccflv=gcc;;
linux:i*86:2.6*) arch=i386_linux26 ; platform=linux; ccflv=gcc;;
linux:i*86:*) arch=i386_linux ; platform=linux; ccflv=gcc;;
linux:x86_64:2.2*) arch=x86_64_linux_22 ; platform=linux; ccflv=gccx8664;;
linux:x86_64:2.4*) arch=x86_64_linux_24 ; platform=linux; ccflv=gccx8664;;
linux:x86_64:2.6*) arch=x86_64_linux_26 ; platform=linux; ccflv=gccx8664;;
linux:x86_64:*) arch=x86_64_linux ; platform=linux; ccflv=gccx8664;;
linux:alpha:*) arch=alpha_linux ; platform=linux; ccflv=gcc;;
linux:arm*:*) arch=arm_linux ; platform=linux; ccflv=gcc;;
linux:ppc*:*) arch=ppc_linux ; platform=linux; ccflv=gcc;;
darwin:power*:7.4*) arch=macosx_74 ; platform=macosx; ccflv=macos;;
darwin:power*:*) arch=macosx ; platform=macosx; ccflv=macos;;
irix*:sgi*:*) arch=sgi ; platform=sgi; ccflv=sgiCC;;
sunos:*:6*) arch=sun4x_6 ; platform=solaris; ccflv=sunCC;;
sunos:*:5.6) arch=sun4x_56 ; platform=solaris; ccflv=sunCC;;
sunos:*:5.7) arch=sun4x_57 ; platform=solaris; ccflv=sunCC;;
sunos:*:5.8) arch=sun4x_58 ; platform=solaris; ccflv=sunCC;;
sunos:*:5.9) arch=sun4x_59 ; platform=solaris; ccflv=sunCC;;
sunos:*:5*) arch=sun4x_5 ; platform=solaris; ccflv=sunCC;;
sunos:*:4*) arch=sun4x_4 ; platform=solaris; ccflv=sunCC;;
cygwin_*:*:*) arch=win32 ; platform=win32; ccflv=wingcc;;
*)
echo "Attempts at guessing your architecture failed."
echo "Please specify the architecture as the first argument."
echo "Do '$0 --help' for a list of avaliable architectures."
exit 1
;;
esac
echo "$osys | $chip | $rele | $arch | $ccflv"
}

###################################################################
#
### echo %%% Some skeleton and config files
#
ARCHS=config/ARCHS
MAKEIN=config/GNUmakefile.in
MAKEOUT=GNUmakefile
ENVIN=config/GNUmake.env.in
ENVOUT=src/GNUmake.env
OPTIN=config/GNUmake.options.in
OPTOUT=src/GNUmake.options

######################################################################
#
### echo %%% Testing the echo features
#
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() {
sversion=`grep "define XrdVERSION" src/XrdVersion.hh`
vers=""
if test ! "x$sversion" = "x" ; then
for i in $sversion ; do
if test ! "x$i" = "x#define" && test ! "x$i" = "xXrdVERSION" ; then
vers="version $i"
fi
done
fi
cat <<EOF

\`configure' configures XRD $vers to adapt to many kind of systems.

Usage: $0 [architecture] [flag=value]

The architecture to build for will be guessed from the output of 'uname'.
If, however, that fails, or you don't want the 'native' compiler on the
host platform, you can specify the architecture to use by passing as the
FIRST argument one of the architecures given at the end of this message.

To build in debug mode use option '--build=debug' .

enable/disable options, prefix with either --enable- or --disable-
krb4 Kerberos4 support, requires Kerberos libs
krb5 Kerberos5 support, requires Kerberos libs
trace Support for trace statements via the "-d" flag

with options, prefix with --with-, enables corresponding support

krb4 KerberosIV support, location of Kerberos distribution
krb4-incdir KerberosIV support, location of kerberosIV/krb.h
krb4-libdir KerberosIV support, location of libkrb4
krb5 Kerberos5 support, location of Kerberos distribution
krb5-incdir Kerberos5 support, location of krb5.h
krb5-libdir Kerberos5 support, location of libkrb5
thread-libdir Path to libpthread

Advanced options:

--build-sec-only Build only security modules
--use-xrd-strlcpy Force use of the xrd implementation of strlcpy

Supported Architectures:

Platform Default Support Description
flavour
EOF

exec < config/ARCHS
read line
while [ ! "x$line" = "x" ]
do
set $line
if test ! "x$3" = "xno" ; then
echo " $line"
fi
read line
done

cat <<EOF

Support: all support for all the modules
sec support for the security modules only

A different flavour can be forced with option --ccflavour=[flavour],
e.g. --ccflavour=gccia64 to use the gcc compiler on Itanium.

Help output is rather long, so you may want to pipe it through a pager, like
for example

$0 --help | more

Report bugs to <[log in to unmask]>
EOF
}

######################################################################
#
### echo %%% See if we got the architecture
#
if test $# -lt 1 ; then
guess_architecture
else
case $1 in
-h|--help) confhelp ; exit 0 ;;
-*) # in case the first argument wasn't an architecure but an option
guess_architecture
;;
*)
arch=$1
shift
;;
esac
fi

######################################################################
#
### echo %%% Command line arguments
#
nccflv="$ccflv"
if test $# -gt 0 ; then
while test ! "x$1" = "x" ; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac

case $1 in
--help|-h) confhelp ; exit 0 ;;
################################################################
#
# With options to specifiy third part software
#
--build-sec-only) seconly="yes" ;;
--ccflavour=*) nccflv=$optarg ;;
--no-create) noact="yes" ;;
--nohowto) nohowto="yes" ;;
--use-xrd-strlcpy) strlcpy="local" ;;
--with-krb4=*) krb4dir=$optarg ; enable_krb4="yes" ;;
--with-krb4-incdir=*) krb4incdir=$optarg ; enable_krb4="yes" ;;
--with-krb4-libdir=*) krb4libdir=$optarg ; enable_krb4="yes" ;;
--with-krb5=*) krb5dir=$optarg ; enable_krb5="yes" ;;
--with-krb5-incdir=*) krb5incdir=$optarg ; enable_krb5="yes" ;;
--with-krb5-libdir=*) krb5libdir=$optarg ; enable_krb5="yes" ;;
--with-thread-libdir=*) threadlibdir=$optarg ; enable_thread="yes" ;;
################################################################
#
# Enable/disable to turn on/off third party software linkage and
# features
#
--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
;;
################################################################
#
# Build steering option
#
--build=*) xrdbuild="$optarg" ;;
*) echo "Invalid option '$1'. Try $0 --help" ; exit 1 ;;
esac
shift
done
fi

#####################################################################
#
# Check that we got a potentially valid architecture
#
if test "$arch" = "linuxegcs" ; then
arch="linux"
fi

goodarch="no"
if `awk '{ print $1 }' $ARCHS | grep "^$arch$" > /dev/null 2>&1` ; then
goodarch="yes"
else
echo "Invalid architecture. Try $0 --help"
exit 1
fi
#
# Check support status
#
support=`grep "$arch" "$ARCHS" 2>/dev/null | awk '{ print $3 }'`
if test "x$support" = "xno" ; then
goodarch="no"
echo "Architecture not yet supported. Try $0 --help"
exit 1
fi
#
# Exit if we want the all thing but we have support for security
# modules only
#
if test "x$support" = "xsec" ; then
if test "x$seconly" = "xno" ; then
goodarch="no"
echo "Architecture supported for security modules only."
echo "Rerun with option '--build-sec-only'"
exit 1
fi
fi

if test "x$platform" = "macosx" ; then
finkdir=`which fink 2>&1 | sed -ne "s/\/bin\/fink//p"`
fi

# Notify configuration settings
if test "x$platform" = "xsolaris" && test "x$nccflv" = "xgcc" ; then
nccflv="sungcc"
fi
if test "x$platform" = "xlinux" && test "x$chip" = "xx86_64" ; then
if test "x$nccflv" = "xicc" ; then
nccflv="iccx8664"
fi
fi

# Notify configuration settings
if test ! "x$nccflv" = "x$ccflv" ; then
echo "Forcing compiler choice ..."
ccflv="$nccflv"
fi
echo "Configuring for $arch and compiler $ccflv"

# For gcc on opteron force checking for 64-bit libs
if test "x$ccflv" = "xgccx8664" ; then
checklib64="yes"
fi

# Check if rtrace option has been required
tracedbg="-DNODEBUG"
if test "x$enable_trace" = "xyes" ; then
tracedbg=""
else
echo "Support for trace statements disabled"
fi

# Which targets to build
targets="\$(SERVER)"
if test "x$seconly" = "xyes" ; then
echo "Building only security modules..."
targets="\$(XRDSEC)"
fi

######################################################################
#
### echo %%% Check for strlcpy
#
hasstrlcpy=""
if test ! "x$strlcpy" = "xlocal"; then
message "Checking whether strlcpy declared in /usr/include/string.h"
if `grep strlcpy /usr/include/string.h > /dev/null 2>&1` ; then
echo "yes"
hasstrlcpy=" -DHAS_STRLCPY"
else
echo "no: use xrd implementation"
fi
else
echo "Using xrd implementation of strlcpy"
fi

######################################################################
#
### echo %%% Flag for /dev/poll
#
hasdevpoll=""
message "Checking architecture for /dev/poll:"
case "$osys:$rele" in
sunos:6*) hasdevpoll="-D_DEVPOLL" ; echo "yes" ;;
sunos:5.8) hasdevpoll="-D_DEVPOLL" : echo "yes" ;;
sunos:5.9) hasdevpoll="-D_DEVPOLL" ; echo "yes" ;;
*) echo "no" ;;
esac

######################################################################
#
### echo %%% Copy skeletons to temporary files
#
if test "x$noact" = "xno"; then
cp -f $MAKEIN GNUmakefile.tmp
cp -f $ENVIN GNUmake.env.tmp
cp -f $OPTIN GNUmake.options.tmp
fi

######################################################################
#
### echo %%% Check type of build
#
dbgsfx=""
dbgopt=""
dbgflg="0"
dbgmsg=""
buildopt="TYPEOPT"
if test "x$xrdbuild" = "xdebug"; then
dbgsfx="_dbg"
dbgopt="DBGSFX=_dbg"
dbgflg="1"
dbgmsg="debug"
buildopt="TYPEDBG"
fi

######################################################################
#
### echo %%% Locate standard commands
#
message "Checking for rm"
rmpath="/bin/rm"
if test ! -x $rmpath ; then
locrm=`which rm 2> /dev/null`
if test ! "x$locrm" = "x" ; then
rmpath="$locrm"
echo "$rmpath"
else
echo "no: assume $rmpath"
fi
else
echo "$rmpath"
fi
message "Checking for ln"
lnpath="/bin/ln"
if test ! -x $lnpath ; then
locln=`which ln 2> /dev/null`
if test ! "x$locln" = "x" ; then
lnpath="$locln"
echo "$lnpath"
else
echo "no: assume $lnpath"
fi
else
echo "$lnpath"
fi

######################################################################
#
### echo %%% Should sonames contain version numbers
#
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
fi

######################################################################
#
### echo %%% Posix Thread Library
#
# Check for posix thread library
#
case $platform in
macosx)
if test "x$enable_thread" = "x"; then
enable_thread="yes"
fi
;;
linux|fbsd)
if test "x$enable_thread" = "x"; then
enable_thread="yes"
threadlib="-pthread"
threadlibdir=
fi
;;
esac
if test "x$enable_thread" = "xyes" && \
test "x$threadlib" = "x" ; then
check_library "libpthread" "$enable_shared" "$threadlibdir" \
$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
threadlib=$found_lib
threadlibdir=$found_dir

if test "x$threadlib" = "x" ; then
enable_thread="no"
fi
fi


######################################################################
#
### Security plugins
xrdsecplugins=""

######################################################################
#
### echo %%% krb4 Support - Third party libraries
#
#
# Check for krb4 (libkrb4.a)
#
krb4extracflags=""
havekrb4=""
if test ! "x$enable_krb4" = "xno" ; then
enable_krb4="yes"

if test "x$KRB4DIR" = "x" && test ! "x$KRB5DIR" = "x" ; then
KRB4DIR=$KRB5DIR
fi

if test "x$krb4dir" = "x" && test ! "x$KRB4DIR" = "x" ; then
krb4dir=$KRB4DIR
fi

if test "x$krb4incdir" = "x" && test ! "x$krb4dir" = "x" ; then
krb4incdir=$krb4dir/include
fi
check_header "kerberosIV/krb.h" "$krb4incdir" \
/afs/slac.stanford.edu/package/krb5/include /usr/athena/include \
/usr/local/athena/include /usr/kerberos/include \
/usr/krb5/include /usr/local/kerberos/include \
/usr/include /usr/local/include
if test "x$found_dir" = "x" ; then
enable_krb4=no
else
krb4inc=$found_hdr
krb4incdir=$found_dir
fi

krb4libdirorg=""
if test ! "x$krb4libdir" = "x" ; then
krb4libdirorg=$krb4libdir
fi
if test "x$krb4libdir" = "x" && test ! "x$krb4dir" = "x" ; then
krb4libdirorg=$krb4dir/lib
fi
krb4libdirs="/afs/slac.stanford.edu/package/krb5/lib /usr/athena/lib \
/usr/local/athena/lib /usr/kerberos/lib \
/usr/krb4/lib /usr/local/kerberos/lib /usr/lib /usr/local/lib"

# check whether using MIT krb5
krb4mit=no
krb4lib=""
krb4libdir=""
check_library libk5crypto "$enable_shared" "$krb4libdirorg" $krb4libdirs
if test ! "x$found_lib" = "x" ; then
krb5mit=yes
fi
message "Checking whether we're using MIT Kerberos"
echo "$krb5mit"

check_library libkrb5 "$enable_shared" "$krb4libdirorg" $krb4libdirs
if test "x$found_lib" = "x" ; then
enable_krb4=no
else
# The order is important here
if test "x$krb5mit" = "xyes" ; then
tmplibs="libkrb4 libkrb5 libdes425 libk5crypto"
for i in $tmplibs ; do
check_library $i "$enable_shared" "$krb4libdirorg" $krb4libdirs
if test "x$found_lib" = "x" ; then
enable_krb4=no
else
krb4lib="$krb4lib $found_lib"
if test "x$krb4libdir" = "x" ; then
krb4libdir="$found_dir"
else
have_already=no
for j in $krb4libdir ; do
if test "x$found_dir" = "x$j" ; then
have_already=yes
fi
done
if test "x$have_already" = "xno" ; then
have_already=yes
krb4libdir="$krb4libdir $found_dir"
fi
fi
fi
done
elif test "x$cryptolib" = "x" ; then
check_library "libcrypto" "$enable_shared" "$krb4libdirorg" \
$krb4libdirs
cryptolib=$found_lib
cryptolibdir=$found_dir
if test -r $cryptolib && test "x$enable_shared" = "xno" ; then
case $platform in
linux) cryptolib="$cryptolib -ldl"
esac
fi
if test "x$cryptolib" = "x" ; then
enable_krb4=no
fi
fi
fi

if test ! "x$enable_krb4" = "xyes" ; then
krb4incdir=""
krb4lib=""
krb4libdir=""
else
krb4extracflags="-DR__KRB4"
havekrb4="krb4"
xrdsecplugins="XrdSeckrb4 $xrdsecplugins"
fi
fi

######################################################################
#
### echo %%% krb5 Support - Third party libraries
#
#
# Check for krb5 (libkrb5.a)
#
krb5extracflags=""
havekrb5=""
if test ! "x$enable_krb5" = "xno" ; then
enable_krb5="yes"

if test "x$krb5dir" = "x" && test ! "x$KRB5DIR" = "x" ; then
krb5dir=$KRB5DIR
fi

if test "x$krb5incdir" = "x" && test ! "x$krb5dir" = "x" ; then
krb5incdir=$krb5dir/include
fi
check_header "krb5.h" "$krb5incdir" \
/afs/slac.stanford.edu/package/krb5/include /usr/athena/include \
/usr/local/athena/include /usr/kerberos/include \
/usr/krb5/include /usr/local/kerberos/include \
/usr/include/et /usr/include /usr/local/include
if test "x$found_dir" = "x" ; then
enable_krb5=no
else
krb5inc=$found_hdr
krb5incdir="$found_dir"
fi

krb5libdirorg=""
if test ! "x$krb5libdir" = "x" ; then
krb5libdirorg=$krb5libdir
fi
if test "x$krb5libdir" = "x" && test ! "x$krb5dir" = "x" ; then
krb5libdirorg=$krb5dir/lib
fi
krb5libdirs="/afs/slac.stanford.edu/package/krb5/lib /usr/athena/lib \
/usr/local/athena/lib /usr/kerberos/lib \
/usr/krb5/lib /usr/local/kerberos/lib /usr/lib /usr/local/lib"

# check whether using MIT krb5
krb5mit=no
krb5lib=""
krb5libdir=""
check_library libk5crypto "$enable_shared" "$krb5libdirorg" $krb5libdirs
if test ! "x$found_lib" = "x" ; then
krb5mit=yes
krb5lib=$found_lib
krb5libdir=$found_dir
fi
message "Checking whether we're using MIT Kerberos"
echo "$krb5mit"

check_library libkrb5 "$enable_shared" "$krb5libdirorg" $krb5libdirs
if test "x$found_lib" = "x" ; then
enable_krb5=no
else
# The order is important here
krb5lib="$found_lib $krb5lib"
if test "x$krb5libdir" = "x" ; then
krb5libdir="$found_dir"
else
have_already=no
for j in $krb5libdir ; do
if test "x$found_dir" = "x$j" ; then
have_already=yes
fi
done
if test "x$have_already" = "xno" ; then
have_already=yes
krb5libdir="$krb5libdir $found_dir"
fi
fi

if test "x$krb5mit" = "xyes" ; then
:
elif test "x$cryptolib" = "x" ; then
check_library "libcrypto" "$enable_shared" "$krb5libdirorg" \
$krb5libdirs
cryptolib=$found_lib
cryptolibdir=$found_dir
if test -r $cryptolib && test "x$enable_shared" = "xno" ; then
case $platform in
linux) cryptolib="$cryptolib -ldl"
esac
fi
if test "x$cryptolib" = "x" ; then
enable_krb5=no
fi
fi
fi

if test ! "x$enable_krb5" = "xyes" ; then
krb5incdir=""
krb5lib=""
krb5libdir=""
else
krb5extracflags="-DR__KRB5"
havekrb5="krb5"
xrdsecplugins="XrdSeckrb5 $xrdsecplugins"
fi
fi

######################################################################
#
### echo %%% Communication of errors library
#
# This library is needed by both AFS and Kerberos support, so to
# avoid duplicate linkage, this is done here.
#
if test "x$enable_krb5" = "xyes" ; then

comerrincdir="/usr/include/et"
if test ! "x$krb5incdir" = "x" ; then
if test ! "x$comerrincdir" = "x" ; then
comerrincdir="$krb5incdir $comerrincdir"
else
comerrincdir=$krb5incdir
fi
fi
check_header "com_err.h" "$comerrincdir" \
/afs/slac.stanford.edu/package/krb5/include /usr/athena/include \
/usr/local/athena/include /usr/kerberos/include \
/usr/krb5/include /usr/local/kerberos/include \
/usr/include /usr/local/include

ceincdir=""
if test ! "x$found_dir" = "x" ; then
ceincdir=$found_dir
fi

if test ! "x$krb5libdirorg" = "x" ; then
if test ! "x$comerrlibdir" = "x" ; then
comerrlibdir="$comerrlibdir $krb5libdirorg"
else
comerrlibdir=$krb5libdirorg
fi
fi
check_library libcom_err "$enable_shared" "$comerrlibdir" \
"$afslibdirs $krb5libdirs"

inckrb4="INCKRB4 = "
libkrb4="LIBKRB4 = "
inckrb5="INCKRB5 = "
libkrb5="LIBKRB5 = "
if test "x$found_lib" = "x" ; then
enable_krb4=no
enable_krb5=no
krb5incdir=""
krb5lib=""
krb5libdir=""
krb5extracflags=""
enable_afs=no
afslib=""
comerrlib=""
comerrlibdir=""
else
comerrlib=$found_lib
comerrlibdir=$found_dir
if test "x$enable_krb4" = "xyes" ; then
# Add header dir, if necessary
have_already=no
for j in $krb4incdir ; do
if test "x$ceincdir" = "x$j" ; then
have_already=yes
fi
done
if test "x$have_already" = "xno" ; then
inckrb4="INCKRB4 = -I$krb4incdir -I$ceincdir"
else
inckrb4="INCKRB4 = -I$krb4incdir"
fi
# Add lib (and lib dir, if necessary)
have_already=no
for j in $krb4libdir ; do
if test "x$comerrlibdir" = "x$j" ; then
have_already=yes
fi
done
if test "x$have_already" = "xno" ; then
libkrb4="LIBKRB4 = $krb4libdir $krb4lib $comerrlibdir $comerrlib"
else
libkrb4="LIBKRB4 = $krb4libdir $krb4lib $comerrlib"
fi
fi
if test "x$enable_krb5" = "xyes" ; then
# Add header dir, if necessary
have_already=no
for j in $krb5incdir ; do
if test "x$ceincdir" = "x$j" ; then
have_already=yes
fi
done
if test "x$have_already" = "xno" ; then
inckrb5="INCKRB5 = -I$krb5incdir -I$ceincdir"
else
inckrb5="INCKRB5 = -I$krb5incdir"
fi
# Add lib (and lib dir, if necessary)
have_already=no
for j in $krb5libdir ; do
if test "x$comerrlibdir" = "x$j" ; then
have_already=yes
fi
done
if test "x$have_already" = "xno" ; then
libkrb5="LIBKRB5 = $krb5libdir $krb5lib $comerrlibdir $comerrlib"
else
libkrb5="LIBKRB5 = $krb5libdir $krb5lib $comerrlib"
fi
fi
fi

case $platform in
linux|solaris) # Resolver lives in separate library
resolvlib="-lresolv"
;;
esac
fi

######################################################################
#
### echo %%% Exit here if this is a dry run
#
if test "x$noact" = "xyes" ; then
exit 0
fi

######################################################################
#
### echo %%% Writing files
#
#---------------------------------------------------------------------
# GNUmakefile
#
message "Writing $MAKEOUT "
sed -e "s|@arch@|$arch|" \
-e "s|@targets@|$targets|" \
-e "s|@type@|$type|" \
-e "s|@rmpath@|$rmpath|" \
-e "s|@lnpath@|$lnpath|" \
-e "s|@xrdsecplugins@|$xrdsecplugins|" \
-e "s|@dbgsfx@|$dbgsfx|g" \
-e "s|@dbgmsg@|$dbgmsg|g" \
< GNUmakefile.tmp > $MAKEOUT
rm -f GNUmakefile.tmp

echo "done"

#---------------------------------------------------------------------
# GNUmake.env
#
message "Writing $ENVOUT "
sed -e "s|@arch@|$arch|" \
-e "s|@type@|$type|" \
-e "s|@ccflv@|$ccflv|" \
-e "s|@threadlib@|$threadlib|" \
-e "s|@threadlibdir@|$threadlibdir|" \
-e "s|@inckrb4@|$inckrb4|" \
-e "s|@libkrb4@|$libkrb4|" \
-e "s|@inckrb5@|$inckrb5|" \
-e "s|@libkrb5@|$libkrb5|" \
-e "s|@hasdevpoll@|$hasdevpoll|" \
-e "s|@hasstrlcpy@|$hasstrlcpy|" \
-e "s|@tracedbg@|$tracedbg|" \
< GNUmake.env.tmp > $ENVOUT
rm -f GNUmake.env.tmp

echo "done"

#---------------------------------------------------------------------
# GNUmake.options
#
message "Writing $OPTOUT "
sed -e "s|@dbgsfx@|$dbgsfx|g" \
-e "s|@dbgopt@|$dbgopt|" \
-e "s|@dbgflg@|$dbgflg|" \
-e "s|@makemsg@|$makemsg|" \
-e "s|@buildopt@|$buildopt|" \
< GNUmake.options.tmp > $OPTOUT
rm -f GNUmake.options.tmp

echo "done"

exit 0

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
July 2009
June 2009
May 2009
April 2009
March 2009
January 2009
December 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use