nsprpub/config/nspr-config.in

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rwxr-xr-x

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 #!/bin/sh
michael@0 2 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 5
michael@0 6
michael@0 7 prefix=@prefix@
michael@0 8
michael@0 9 major_version=@MOD_MAJOR_VERSION@
michael@0 10 minor_version=@MOD_MINOR_VERSION@
michael@0 11 patch_version=@MOD_PATCH_VERSION@
michael@0 12
michael@0 13 usage()
michael@0 14 {
michael@0 15 cat <<EOF
michael@0 16 Usage: nspr-config [OPTIONS] [LIBRARIES]
michael@0 17 Options:
michael@0 18 [--prefix[=DIR]]
michael@0 19 [--exec-prefix[=DIR]]
michael@0 20 [--includedir[=DIR]]
michael@0 21 [--libdir[=DIR]]
michael@0 22 [--version]
michael@0 23 [--libs]
michael@0 24 [--cflags]
michael@0 25 Libraries:
michael@0 26 nspr
michael@0 27 plc
michael@0 28 plds
michael@0 29 EOF
michael@0 30 exit $1
michael@0 31 }
michael@0 32
michael@0 33 if test $# -eq 0; then
michael@0 34 usage 1 1>&2
michael@0 35 fi
michael@0 36
michael@0 37 lib_nspr=yes
michael@0 38 lib_plc=yes
michael@0 39 lib_plds=yes
michael@0 40
michael@0 41 while test $# -gt 0; do
michael@0 42 case "$1" in
michael@0 43 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
michael@0 44 *) optarg= ;;
michael@0 45 esac
michael@0 46
michael@0 47 case $1 in
michael@0 48 --prefix=*)
michael@0 49 prefix=$optarg
michael@0 50 ;;
michael@0 51 --prefix)
michael@0 52 echo_prefix=yes
michael@0 53 ;;
michael@0 54 --exec-prefix=*)
michael@0 55 exec_prefix=$optarg
michael@0 56 ;;
michael@0 57 --exec-prefix)
michael@0 58 echo_exec_prefix=yes
michael@0 59 ;;
michael@0 60 --includedir=*)
michael@0 61 includedir=$optarg
michael@0 62 ;;
michael@0 63 --includedir)
michael@0 64 echo_includedir=yes
michael@0 65 ;;
michael@0 66 --libdir=*)
michael@0 67 libdir=$optarg
michael@0 68 ;;
michael@0 69 --libdir)
michael@0 70 echo_libdir=yes
michael@0 71 ;;
michael@0 72 --version)
michael@0 73 echo ${major_version}.${minor_version}.${patch_version}
michael@0 74 ;;
michael@0 75 --cflags)
michael@0 76 echo_cflags=yes
michael@0 77 ;;
michael@0 78 --libs)
michael@0 79 echo_libs=yes
michael@0 80 ;;
michael@0 81 nspr)
michael@0 82 lib_nspr=yes
michael@0 83 ;;
michael@0 84 plc)
michael@0 85 lib_plc=yes
michael@0 86 ;;
michael@0 87 plds)
michael@0 88 lib_plds=yes
michael@0 89 ;;
michael@0 90 *)
michael@0 91 usage 1 1>&2
michael@0 92 ;;
michael@0 93 esac
michael@0 94 shift
michael@0 95 done
michael@0 96
michael@0 97 # Set variables that may be dependent upon other variables
michael@0 98 if test -z "$exec_prefix"; then
michael@0 99 exec_prefix=@exec_prefix@
michael@0 100 fi
michael@0 101 if test -z "$includedir"; then
michael@0 102 includedir=@includedir@
michael@0 103 fi
michael@0 104 if test -z "$libdir"; then
michael@0 105 libdir=@libdir@
michael@0 106 fi
michael@0 107
michael@0 108 if test "$echo_prefix" = "yes"; then
michael@0 109 echo $prefix
michael@0 110 fi
michael@0 111
michael@0 112 if test "$echo_exec_prefix" = "yes"; then
michael@0 113 echo $exec_prefix
michael@0 114 fi
michael@0 115
michael@0 116 if test "$echo_includedir" = "yes"; then
michael@0 117 echo $includedir
michael@0 118 fi
michael@0 119
michael@0 120 if test "$echo_libdir" = "yes"; then
michael@0 121 echo $libdir
michael@0 122 fi
michael@0 123
michael@0 124 if test "$echo_cflags" = "yes"; then
michael@0 125 echo -I$includedir
michael@0 126 fi
michael@0 127
michael@0 128 if test "$echo_libs" = "yes"; then
michael@0 129 libdirs=-L$libdir
michael@0 130 if test -n "$lib_plds"; then
michael@0 131 libdirs="$libdirs -lplds${major_version}"
michael@0 132 fi
michael@0 133 if test -n "$lib_plc"; then
michael@0 134 libdirs="$libdirs -lplc${major_version}"
michael@0 135 fi
michael@0 136 if test -n "$lib_nspr"; then
michael@0 137 libdirs="$libdirs -lnspr${major_version}"
michael@0 138 fi
michael@0 139 os_ldflags="@LDFLAGS@"
michael@0 140 for i in $os_ldflags ; do
michael@0 141 if echo $i | grep \^-L >/dev/null; then
michael@0 142 libdirs="$libdirs $i"
michael@0 143 fi
michael@0 144 done
michael@0 145 echo $libdirs @OS_LIBS@
michael@0 146 fi
michael@0 147

mercurial