File: rivet-config.in

package info (click to toggle)
rivet 1.8.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 29,332 kB
  • ctags: 10,713
  • sloc: cpp: 59,356; sh: 11,294; python: 6,747; ansic: 1,751; makefile: 1,538
file content (88 lines) | stat: -rw-r--r-- 3,083 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#! /usr/bin/env bash
## -*- sh -*-
## @configure_input@

## These variables need to exist
## Note no use of $DESTDIR... we ignore it so that destdir can be used
## for temp installs later copied to /
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir=@datarootdir@

tmp=$(echo $* | egrep -- '--\<help\>|-\<h\>')
if test $# -eq 0 || test -n "$tmp"; then
    echo "rivet-config: configuration tool for the Rivet generator validation system"
    echo "              http://projects.hepforge.org/rivet/"
    echo
    echo "Usage: $( basename $0 ) [--help|-h] | "
    echo "           [--{prefix,datadir,libdir,includedir}] | "
    echo "           [--{cppflags,ldflags,ldlibs}] | "
    echo "           [--version]"
    echo "Options:"
    echo "  --help | -h   : show this help message"
    echo
    echo "  --prefix      : show the installation prefix (cf. autoconf)"
    echo "  --includedir  : show the path to the directory containing the Rivet headers"
    echo "  --libdir      : show the path to the directory containing the Rivet libraries"
    echo "  --datadir     : show the path to the directory containing Rivet data"
    echo
    echo "  --pythonpath  : show the path(s) to the directory containing Rivet Python modules"
    echo "  --cppflags    : returns a Rivet '-I' string for insertion into CPPFLAGS"
    echo "  --ldflags     : returns a Rivet '-L' string for insertion into LDFLAGS"
    echo "  --libs        : returns a Rivet '-l' string for insertion into LIBS or LIBADD"
    echo
    echo "  --version     : returns Rivet release version number"
fi

OUT=""

## "Atomic" build info, for "roll your own build" obsessives
tmp=$( echo "$*" | egrep -- '--\<prefix\>')
test -n "$tmp" && OUT="$OUT @prefix@"

tmp=$( echo "$*" | egrep -- '--\<includedir\>')
test -n "$tmp" && OUT="$OUT @includedir@"

tmp=$( echo "$*" | egrep -- '--\<libdir\>')
test -n "$tmp" && OUT="$OUT @libdir@"

tmp=$( echo "$*" | egrep -- '--\<datadir\>')
test -n "$tmp" && OUT="$OUT @datadir@/@PACKAGE_TARNAME@"

tmp=$( echo "$*" | egrep -- '--\<pythonpath\>')
test -n "$tmp" && OUT="$OUT @RIVET_PYTHONPATH@"

## "Pre-rolled" build info
tmp=$( echo "$*" | egrep -- '--\<cppflags\>')
if test -n "$tmp"; then
    irivet="@includedir@"
    test -n "$irivet" && OUT="$OUT -I${irivet}"
    ihepmc="@HEPMCINCPATH@"
    test -n "$ihepmc" && OUT="$OUT -I${ihepmc}"
    ifastjet="@FASTJETINCPATH@"
    test -n "$ifastjet" && OUT="$OUT -I${ifastjet}"
    igsl="@GSLINCPATH@"
    test -n "$igsl" && OUT="$OUT -I${igsl}"
    iboost="@BOOSTINCPATH@"
    test -n "$iboost" && OUT="$OUT -I${iboost}"
fi

tmp=$( echo "$*" | egrep -- '--\<ldflags\>')
if test -n "$tmp"; then
    lrivet="@libdir@"
    test -n "$lrivet" && OUT="$OUT -L${lrivet}"
    lhepmc="@HEPMCLIBPATH@"
    test -n "$lhepmc" && OUT="$OUT -L${lhepmc}"
    lfastjet="@FASTJETLIBPATH@"
    test -n "$lfastjet" && OUT="$OUT -L${lfastjet}"
fi

tmp=$( echo "$*" | egrep -- '--\<libs\>|--\<ldadd\>')
test -n "$tmp" && OUT="$OUT -lRivet"


## Version
tmp=$( echo "$*" | egrep -- '--\<version\>')
test -n "$tmp" && echo @PACKAGE_VERSION@

echo $OUT