#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/sh

usage() {
	cat <<EOF
Usage:
  /nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0/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="/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0"
exec_prefix="/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0"

case "$1" in
--help | -h)
	usage
	exit 0
	;;
--version)
	echo "5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c"
	;;
--revision)
	echo "2"
	;;
--config)
	echo "--disable-static --prefix=/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0 CC=gcc CXX=g++"
	;;
--prefix)
	echo "/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0"
	;;
--bindir)
	echo "/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0/bin"
	;;
--datadir)
	echo "/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0/share"
	;;
--includedir)
	echo "/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0/include"
	;;
--libdir)
	echo "/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0/lib"
	;;
--mandir)
	echo "/nix/store/ja5g0c07dmkf1cga88acvxlvkl127nbd-jemalloc-5.3.0/share/man"
	;;
--cc)
	echo "gcc"
	;;
--cflags)
	echo "-std=gnu11 -Wall -Wextra -Wsign-compare -Wundef -Wno-format-zero-length -Wpointer-arith -Wno-missing-braces -Wno-missing-field-initializers -Wno-missing-attributes -pipe -g3 -fvisibility=hidden -Wimplicit-fallthrough -O3 -funroll-loops"
	;;
--cppflags)
	echo "-D_GNU_SOURCE -D_REENTRANT"
	;;
--cxxflags)
	echo "-Wall -Wextra -g3 -fvisibility=hidden -Wimplicit-fallthrough -O3"
	;;
--ldflags)
	echo " "
	;;
--libs)
	echo "-lm -lstdc++ -pthread"
	;;
*)
	usage
	exit 1
esac
