#!/bin/sh

usage() {
	cat <<EOF
Usage:
  /opt/rh/rh-varnish6/root/usr/bin/jemalloc-config <option>
Options:
  --help | -h  : Print usage.
  --version    : Print jemalloc version.
  --revision   : Print shared library revision number.
  --config     : Print configure options used to build jemalloc.
  --prefix     : Print installation directory prefix.
  --bindir     : Print binary installation directory.
  --datadir    : Print data installation directory.
  --includedir : Print include installation directory.
  --libdir     : Print library installation directory.
  --mandir     : Print manual page installation directory.
  --cc         : Print compiler used to build jemalloc.
  --cflags     : Print compiler flags used to build jemalloc.
  --cppflags   : Print preprocessor flags used to build jemalloc.
  --cxxflags   : Print C++ compiler flags used to build jemalloc.
  --ldflags    : Print library flags used to build jemalloc.
  --libs       : Print libraries jemalloc was linked against.
EOF
}

prefix="/opt/rh/rh-varnish6/root/usr"
exec_prefix="/opt/rh/rh-varnish6/root/usr"

case "$1" in
--help | -h)
	usage
	exit 0
	;;
--version)
	echo "5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb"
	;;
--revision)
	echo "2"
	;;
--config)
	echo "--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/opt/rh/rh-varnish6/root/usr --exec-prefix=/opt/rh/rh-varnish6/root/usr --bindir=/opt/rh/rh-varnish6/root/usr/bin --sbindir=/opt/rh/rh-varnish6/root/usr/sbin --sysconfdir=/opt/rh/rh-varnish6/root/etc --datadir=/opt/rh/rh-varnish6/root/usr/share --includedir=/opt/rh/rh-varnish6/root/usr/include --libdir=/opt/rh/rh-varnish6/root/usr/lib64 --libexecdir=/opt/rh/rh-varnish6/root/usr/libexec --localstatedir=/opt/rh/rh-varnish6/root/var --sharedstatedir=/opt/rh/rh-varnish6/root/var/lib --mandir=/opt/rh/rh-varnish6/root/usr/share/man --infodir=/opt/rh/rh-varnish6/root/usr/share/info build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'"
	;;
--prefix)
	echo "/opt/rh/rh-varnish6/root/usr"
	;;
--bindir)
	echo "/opt/rh/rh-varnish6/root/usr/bin"
	;;
--datadir)
	echo "/opt/rh/rh-varnish6/root/usr/share"
	;;
--includedir)
	echo "/opt/rh/rh-varnish6/root/usr/include"
	;;
--libdir)
	echo "/opt/rh/rh-varnish6/root/usr/lib64"
	;;
--mandir)
	echo "/opt/rh/rh-varnish6/root/usr/share/man"
	;;
--cc)
	echo "gcc"
	;;
--cflags)
	echo "-std=gnu11 -Wall -Wsign-compare -Wundef -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic"
	;;
--cppflags)
	echo "-D_GNU_SOURCE -D_REENTRANT"
	;;
--cxxflags)
	echo "-fvisibility=hidden -O3 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic"
	;;
--ldflags)
	echo "-Wl,-z,relro  "
	;;
--libs)
	echo "-lm  -lpthread -ldl"
	;;
*)
	usage
	exit 1
esac
