-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhhgrid-config.in
54 lines (43 loc) · 1.86 KB
/
hhgrid-config.in
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
#! /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@
if [[ $# -eq 0 || -n $( echo $* | egrep -- "--help|-h" ) ]]; then
echo "hhgrid-config: configuration tool for the hhgrid"
echo " gghh 2-loop virtual amplitude interfered with 1-loop amplitude"
echo " https://github.com/mppmu/hhgrid"
echo
echo "Usage: hhgrid-config [options]"
echo "Options:"
echo " --help | -h : show this help message"
echo " --prefix : show the installation prefix (cf. autoconf)"
echo " --incdir : show the path to the hhgrid C header directory"
echo " --libdir : show the path to the hhgrid library directory"
echo " --datadir : show the path to the hhgrid data directory"
echo
echo " --cflags : get compiler flags (aka --cppflags|--cxxflags)"
echo " --libs : get linker flags (aka --ldflags)"
echo
echo " --version : return hhgrid release version number"
fi
OUT=""
tmp=$( echo "$*" | egrep -- '--\<prefix\>')
test -n "$tmp" && OUT="$OUT @prefix@"
tmp=$( echo "$*" | egrep -- '--\<incdir\>')
test -n "$tmp" && OUT="$OUT @includedir@"
tmp=$( echo "$*" | egrep -- '--\<cflags|cppflags|cxxflags\>')
test -n "$tmp" && OUT="$OUT -I@includedir@ @PYTHON_CSPEC@"
tmp=$( echo "$*" | egrep -- '--\<libdir\>')
test -n "$tmp" && OUT="$OUT @libdir@"
tmp=$( echo "$*" | egrep -- '--\<libs|ldflags\>')
test -n "$tmp" && OUT="$OUT -L@libdir@ -lhhgrid @PYTHON_LSPEC@"
tmp=$( echo "$*" | egrep -- '--\<datadir\>|--\<datarootdir\>')
test -n "$tmp" && OUT="$OUT @datadir@/@PACKAGE_TARNAME@"
tmp=$( echo "$*" | egrep -- '--\<version\>')
test -n "$tmp" && OUT="$OUT @PACKAGE_VERSION@"
echo $OUT