xref: /freebsd/contrib/jemalloc/bin/jemalloc-config.in (revision bf6039f09a30484c0749a3e3047d6a47b116b466)
1*bf6039f0SWarner Losh#!/bin/sh
2*bf6039f0SWarner Losh
3*bf6039f0SWarner Loshusage() {
4*bf6039f0SWarner Losh	cat <<EOF
5*bf6039f0SWarner LoshUsage:
6*bf6039f0SWarner Losh  @BINDIR@/jemalloc-config <option>
7*bf6039f0SWarner LoshOptions:
8*bf6039f0SWarner Losh  --help | -h  : Print usage.
9*bf6039f0SWarner Losh  --version    : Print jemalloc version.
10*bf6039f0SWarner Losh  --revision   : Print shared library revision number.
11*bf6039f0SWarner Losh  --config     : Print configure options used to build jemalloc.
12*bf6039f0SWarner Losh  --prefix     : Print installation directory prefix.
13*bf6039f0SWarner Losh  --bindir     : Print binary installation directory.
14*bf6039f0SWarner Losh  --datadir    : Print data installation directory.
15*bf6039f0SWarner Losh  --includedir : Print include installation directory.
16*bf6039f0SWarner Losh  --libdir     : Print library installation directory.
17*bf6039f0SWarner Losh  --mandir     : Print manual page installation directory.
18*bf6039f0SWarner Losh  --cc         : Print compiler used to build jemalloc.
19*bf6039f0SWarner Losh  --cflags     : Print compiler flags used to build jemalloc.
20*bf6039f0SWarner Losh  --cppflags   : Print preprocessor flags used to build jemalloc.
21*bf6039f0SWarner Losh  --cxxflags   : Print C++ compiler flags used to build jemalloc.
22*bf6039f0SWarner Losh  --ldflags    : Print library flags used to build jemalloc.
23*bf6039f0SWarner Losh  --libs       : Print libraries jemalloc was linked against.
24*bf6039f0SWarner LoshEOF
25*bf6039f0SWarner Losh}
26*bf6039f0SWarner Losh
27*bf6039f0SWarner Loshprefix="@prefix@"
28*bf6039f0SWarner Loshexec_prefix="@exec_prefix@"
29*bf6039f0SWarner Losh
30*bf6039f0SWarner Loshcase "$1" in
31*bf6039f0SWarner Losh--help | -h)
32*bf6039f0SWarner Losh	usage
33*bf6039f0SWarner Losh	exit 0
34*bf6039f0SWarner Losh	;;
35*bf6039f0SWarner Losh--version)
36*bf6039f0SWarner Losh	echo "@jemalloc_version@"
37*bf6039f0SWarner Losh	;;
38*bf6039f0SWarner Losh--revision)
39*bf6039f0SWarner Losh	echo "@rev@"
40*bf6039f0SWarner Losh	;;
41*bf6039f0SWarner Losh--config)
42*bf6039f0SWarner Losh	echo "@CONFIG@"
43*bf6039f0SWarner Losh	;;
44*bf6039f0SWarner Losh--prefix)
45*bf6039f0SWarner Losh	echo "@PREFIX@"
46*bf6039f0SWarner Losh	;;
47*bf6039f0SWarner Losh--bindir)
48*bf6039f0SWarner Losh	echo "@BINDIR@"
49*bf6039f0SWarner Losh	;;
50*bf6039f0SWarner Losh--datadir)
51*bf6039f0SWarner Losh	echo "@DATADIR@"
52*bf6039f0SWarner Losh	;;
53*bf6039f0SWarner Losh--includedir)
54*bf6039f0SWarner Losh	echo "@INCLUDEDIR@"
55*bf6039f0SWarner Losh	;;
56*bf6039f0SWarner Losh--libdir)
57*bf6039f0SWarner Losh	echo "@LIBDIR@"
58*bf6039f0SWarner Losh	;;
59*bf6039f0SWarner Losh--mandir)
60*bf6039f0SWarner Losh	echo "@MANDIR@"
61*bf6039f0SWarner Losh	;;
62*bf6039f0SWarner Losh--cc)
63*bf6039f0SWarner Losh	echo "@CC@"
64*bf6039f0SWarner Losh	;;
65*bf6039f0SWarner Losh--cflags)
66*bf6039f0SWarner Losh	echo "@CFLAGS@"
67*bf6039f0SWarner Losh	;;
68*bf6039f0SWarner Losh--cppflags)
69*bf6039f0SWarner Losh	echo "@CPPFLAGS@"
70*bf6039f0SWarner Losh	;;
71*bf6039f0SWarner Losh--cxxflags)
72*bf6039f0SWarner Losh	echo "@CXXFLAGS@"
73*bf6039f0SWarner Losh	;;
74*bf6039f0SWarner Losh--ldflags)
75*bf6039f0SWarner Losh	echo "@LDFLAGS@ @EXTRA_LDFLAGS@"
76*bf6039f0SWarner Losh	;;
77*bf6039f0SWarner Losh--libs)
78*bf6039f0SWarner Losh	echo "@LIBS@"
79*bf6039f0SWarner Losh	;;
80*bf6039f0SWarner Losh*)
81*bf6039f0SWarner Losh	usage
82*bf6039f0SWarner Losh	exit 1
83*bf6039f0SWarner Loshesac
84