- Cleaned up launching procedure for ginaccint.bin.
[ginac.git] / cint / ginaccint.in
index 14c9d499b89d8571708dac5417adedb64d484d2a..b4aed36125d990310cdfbeb6b239914b1ba87b62 100644 (file)
@@ -4,10 +4,21 @@ binprog=`basename $0`".bin"
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 bindir=@bindir@
+libdir=@libdir@
 config_cintsysdir=@CINTSYSDIR@
+program=${bindir}/${binprog}
 
-if [ "x$CINTSYSDIR" = "x" ]; then
-  CINTSYSDIR=$config_cintsysdir
-  export CINTSYSDIR
-fi
-exec ${bindir}/${binprog} "$@"
+# Unless the user doesn't override $CINTSYSDIR, assume the value
+# given at configuration time:
+CINTSYSDIR=${CINTSYSDIR-$config_cintsysdir}
+export CINTSYSDIR
+
+# Extend LD_LIBRARY_PATH, needed because Cint isn't libtoolized:
+LD_LIBRARY_PATH=${libdir}:${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH
+
+# Execute ginaccint.bin with all arguments given:
+exec ${program} ${1+"$@"}
+
+echo "$0: cannot exec ${program} ${1+"$@"}"
+exit 1