1 #!/bin/sh 2 3 usage() { 4 cat <<EOF 5 Usage: 6 @BINDIR@/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="@prefix@" 28 exec_prefix="@exec_prefix@" 29 30 case "$1" in 31 --help | -h) 32 usage 33 exit 0 34 ;; 35 --version) 36 echo "@jemalloc_version@" 37 ;; 38 --revision) 39 echo "@rev@" 40 ;; 41 --config) 42 echo "@CONFIG@" 43 ;; 44 --prefix) 45 echo "@PREFIX@" 46 ;; 47 --bindir) 48 echo "@BINDIR@" 49 ;; 50 --datadir) 51 echo "@DATADIR@" 52 ;; 53 --includedir) 54 echo "@INCLUDEDIR@" 55 ;; 56 --libdir) 57 echo "@LIBDIR@" 58 ;; 59 --mandir) 60 echo "@MANDIR@" 61 ;; 62 --cc) 63 echo "@CC@" 64 ;; 65 --cflags) 66 echo "@CFLAGS@" 67 ;; 68 --cppflags) 69 echo "@CPPFLAGS@" 70 ;; 71 --cxxflags) 72 echo "@CXXFLAGS@" 73 ;; 74 --ldflags) 75 echo "@LDFLAGS@ @EXTRA_LDFLAGS@" 76 ;; 77 --libs) 78 echo "@LIBS@" 79 ;; 80 *) 81 usage 82 exit 1 83 esac 84