Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:17:18

0001 #!/bin/sh
0002 
0003 # Print some compiler options to aid in building programs that use
0004 # JANA as a 3rd party package.
0005 
0006 # Here we have a couple of options for dealing with various user
0007 # environments. Namely, if the user has set JANA_HOME, but it is
0008 # different from the installation directory pasted into this file
0009 # during installation, then we have to decide what to go with.
0010 #
0011 # Here we check if the JANA static library file exists using the
0012 # the hardwired installation directory value. If not, then we
0013 # look for the JANA_HOME environment variable. If that is not set
0014 # then just use /usr/local.
0015 
0016 # Hardwired values. Most of this is copied from BMS/Makefile.config.in
0017 # and helps document the settings when JANA was built so there is
0018 # the possibility of reusing them if needed when building against
0019 # this JANA installation.
0020 BMS_OSNAME="@BMS_OSNAME@"
0021 
0022 HAVE_MYSQL="@HAVE_MYSQL@"
0023 JANA2_HAVE_XERCES="@JANA2_HAVE_XERCES@"
0024 JANA2_HAVE_ROOT="@JANA2_HAVE_ROOT@"
0025 HAVE_CMSG="@HAVE_CMSG@"
0026 HAVE_CURL="@HAVE_CURL@"
0027 HAVE_CCDB="@HAVE_CCDB@"
0028 
0029 MYSQL_CFLAGS="@MYSQL_CFLAGS@"
0030 MYSQL_LDFLAGS="@MYSQL_LDFLAGS@"
0031 MYSQL_VERSION="@MYSQL_VERSION@"
0032 
0033 XERCES_CPPFLAGS="@XERCES_CPPFLAGS@"
0034 XERCES_LDFLAGS="@XERCES_LDFLAGS@"
0035 XERCES_LIBS="@XERCES_LIBS@"
0036 
0037 ROOTCFLAGS="@ROOTCFLAGS@"
0038 ROOTGLIBS="@ROOTGLIBS@"
0039 
0040 CMSG_CPPFLAGS="@CMSG_CPPFLAGS@"
0041 CMSG_LDFLAGS="@CMSG_LDFLAGS@"
0042 CMSG_LIBS="@CMSG_LIBS@"
0043 
0044 CURL_CFLAGS="@CURL_CFLAGS@"
0045 CURL_LDFLAGS="@CURL_LDFLAGS@"
0046 
0047 CCDB_CPPFLAGS="@CCDB_CPPFLAGS@"
0048 CCDB_LDFLAGS="@CCDB_LDFLAGS@"
0049 CCDB_LIBS="@CCDB_LIBS@"
0050 
0051 JANA_INSTALL_DIR="@JANA_INSTALL_DIR@"
0052 JANA_ONLY_LIBS="@JANA_ONLY_LIBS@"
0053 
0054 # Add flags and libraries from all 3rd party packages
0055 CPPFLAGS="${MYSQL_CFLAGS} ${XERCES_CPPFLAGS} ${ROOTCFLAGS} ${CMSG_CPPFLAGS} ${CURL_CFLAGS} ${CCDB_CPPFLAGS}"
0056 LDFLAGS="${MYSQL_LDFLAGS} ${XERCES_LDFLAGS} ${CMSG_LDFLAGS} ${CURL_LDFLAGS} ${CCDB_LDFLAGS}"
0057 LIBS="${XERCES_LIBS} ${ROOTGLIBS} ${CMSG_LIBS} ${CCDB_LIBS}"
0058 
0059 # If hardwired value doesn't point to libJANA.a, try JANA_HOME
0060 if [ ! -e "${JANA_INSTALL_DIR}/lib/libJANA.a" ]; then
0061         if [ -n "${JANA_HOME:+x}" ]; then
0062                 JANA_INSTALL_DIR=${JANA_HOME}
0063         else
0064                 JANA_INSTALL_DIR=/usr/local
0065         fi
0066 fi
0067 
0068 # Loop over command line arguments
0069 while test $# -gt 0; do
0070 
0071         case $1 in
0072                 --cflags)
0073                         mess="$mess -I${JANA_INSTALL_DIR}/include ${CPPFLAGS}"
0074                         ;;
0075         esac
0076         case $1 in
0077                 --libs)
0078                         mess="$mess -Wl,-rpath,${JANA_INSTALL_DIR}/lib -L${JANA_INSTALL_DIR}/lib -lJANA ${LDFLAGS} ${JANA_ONLY_LIBS} ${LIBS}"
0079                         ;;
0080         esac
0081         case $1 in
0082                 --static-libs)
0083                         mess="$mess ${JANA_INSTALL_DIR}/lib/libJANA.a ${LDFLAGS} ${JANA_ONLY_LIBS} ${LIBS}"
0084                         ;;
0085         esac
0086         case $1 in
0087                 --jana-only)
0088                         CPPFLAGS=""
0089                         LDFLAGS=""
0090                         LIBS=""
0091                         ;;
0092         esac
0093         case $1 in
0094                 --help)
0095                         echo " "
0096                         echo "Usage: "
0097                         echo "     jana-config [--jana-only] [--cflags] [--libs] "
0098                         echo " "
0099                         echo "Print compiler options useful to help build programs using this "
0100                         echo "JANA installation. "
0101                         echo " "
0102                         echo " --jana-only  Don't include arguments from packages JANA was built "
0103                         echo "              to include support for. Use this if you wish to specify "
0104                         echo "              these yourself. If you do include this option, it must "
0105                         echo "              come first in the arugment list as it will only affect "
0106                         echo "              options that follow it. "
0107                         echo " "
0108                         echo " --cflags     print flags needed to compile (not necessarily link) "
0109                         echo "              a program against this installation of JANA. "
0110                         echo " "
0111                         echo " --libs       print flags needed to link a program against this "
0112                         echo "              installation of JANA. "
0113                         mess=" "
0114                         ;;
0115         esac
0116         shift
0117 done
0118 
0119 echo $mess