1 #!/bin/sh 2 3 usage() { 4 cat <<EOF 5 Usage: 6 /usr/local/bin/jemalloc-config <option> 7 Options: 8 --help | -h : Print usage. 9 --version : Print jemalloc version. 10 --revision : Print shared library revision number. 11 --config : Print configure options used to build jemalloc. 12 --prefix : Print installation directory prefix. 13 --bindir : Print binary installation directory. 14 --datadir : Print data installation directory. 15 --includedir : Print include installation directory. 16 --libdir : Print library installation directory. 17 --mandir : Print manual page installation directory. 18 --cc : Print compiler used to build jemalloc. 19 --cflags : Print compiler flags used to build jemalloc. 20 --cppflags : Print preprocessor flags used to build jemalloc. 21 --cxxflags : Print C++ compiler flags used to build jemalloc. 22 --ldflags : Print library flags used to build jemalloc. 23 --libs : Print libraries jemalloc was linked against. 24 EOF 25 } 26 27 prefix="/usr/local" 28 exec_prefix="/usr/local" 29 30 case "$1" in 31 --help | -h) 32 usage 33 exit 0 34 ;; 35 --version) 36 echo "5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8" 37 ;; 38 --revision) 39 echo "2" 40 ;; 41 --config) 42 echo "" 43 ;; 44 --prefix) 45 echo "/usr/local" 46 ;; 47 --bindir) 48 echo "/usr/local/bin" 49 ;; 50 --datadir) 51 echo "/usr/local/share" 52 ;; 53 --includedir) 54 echo "/usr/local/include" 55 ;; 56 --libdir) 57 echo "/usr/local/lib" 58 ;; 59 --mandir) 60 echo "/usr/local/share/man" 61 ;; 62 --cc) 63 echo "gcc" 64 ;; 65 --cflags) 66 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 -Wdeprecated-declarations -O3 -funroll-loops" 67 ;; 68 --cppflags) 69 echo "-D_GNU_SOURCE -D_REENTRANT" 70 ;; 71 --cxxflags) 72 echo "-Wall -Wextra -g3 -fvisibility=hidden -Wimplicit-fallthrough -Wdeprecated-declarations -O3" 73 ;; 74 --ldflags) 75 echo " " 76 ;; 77 --libs) 78 echo "-lm -lstdc++ -pthread" 79 ;; 80 *) 81 usage 82 exit 1 83 esac 84