#!/bin/sh

usage() {
	cat <<EOF
Usage:
  /opt/anaconda1anaconda2anaconda3/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/anaconda1anaconda2anaconda3"
exec_prefix="/opt/anaconda1anaconda2anaconda3"

case "$1" in
--help | -h)
	usage
	exit 0
	;;
--version)
	echo "5.0.1-0-g896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb"
	;;
--revision)
	echo "2"
	;;
--config)
	echo "--prefix=/opt/anaconda1anaconda2anaconda3 --build=x86_64-conda_cos6-linux-gnu --host=x86_64-conda_cos6-linux-gnu build_alias=x86_64-conda_cos6-linux-gnu host_alias=x86_64-conda_cos6-linux-gnu CC=/tmp/build/80754af9/jemalloc_1514580728979/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc 'CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/opt/anaconda1anaconda2anaconda3/include -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=${PREFIX}=/usr/local/src/conda-prefix' 'LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib -L/opt/anaconda1anaconda2anaconda3/lib' 'CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2' CPP=/tmp/build/80754af9/jemalloc_1514580728979/_build_env/bin/x86_64-conda_cos6-linux-gnu-cpp CXX=/tmp/build/80754af9/jemalloc_1514580728979/_build_env/bin/x86_64-conda_cos6-linux-gnu-c++ 'CXXFLAGS=-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/opt/anaconda1anaconda2anaconda3/include -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=${PREFIX}=/usr/local/src/conda-prefix'"
	;;
--prefix)
	echo "/opt/anaconda1anaconda2anaconda3"
	;;
--bindir)
	echo "/opt/anaconda1anaconda2anaconda3/bin"
	;;
--datadir)
	echo "/opt/anaconda1anaconda2anaconda3/share"
	;;
--includedir)
	echo "/opt/anaconda1anaconda2anaconda3/include"
	;;
--libdir)
	echo "/opt/anaconda1anaconda2anaconda3/lib"
	;;
--mandir)
	echo "/opt/anaconda1anaconda2anaconda3/share/man"
	;;
--cc)
	echo "/tmp/build/80754af9/jemalloc_1514580728979/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc"
	;;
--cflags)
	echo "-std=gnu11 -Wall -Wsign-compare -Wundef -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/opt/anaconda1anaconda2anaconda3/include -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=${PREFIX}=/usr/local/src/conda-prefix"
	;;
--cppflags)
	echo "-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -D_GNU_SOURCE -D_REENTRANT"
	;;
--cxxflags)
	echo "-Wall -g3 -fvisibility=hidden -O3 -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -I/opt/anaconda1anaconda2anaconda3/include -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=${PREFIX}=/usr/local/src/conda-prefix"
	;;
--ldflags)
	echo "-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/opt/anaconda1anaconda2anaconda3/lib -L/opt/anaconda1anaconda2anaconda3/lib "
	;;
--libs)
	echo "-lrt -lm -lstdc++ -lpthread -ldl"
	;;
*)
	usage
	exit 1
esac
