Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
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 | prefix='@prefix@' |
michael@0 | 7 | mozilla_version='@MOZILLA_VERSION@' |
michael@0 | 8 | JS_LIBRARY_NAME='@JS_LIBRARY_NAME@' |
michael@0 | 9 | NSPR_CFLAGS='@NSPR_CFLAGS@' |
michael@0 | 10 | JS_CONFIG_LIBS='@JS_CONFIG_LIBS@' |
michael@0 | 11 | MOZ_JS_LIBS='@JS_CONFIG_MOZ_JS_LIBS@' |
michael@0 | 12 | |
michael@0 | 13 | FILENAME=`basename "$0"` |
michael@0 | 14 | |
michael@0 | 15 | usage() |
michael@0 | 16 | { |
michael@0 | 17 | cat <<EOF |
michael@0 | 18 | Usage: $FILENAME [OPTIONS] |
michael@0 | 19 | Options: |
michael@0 | 20 | [--prefix[=DIR]] |
michael@0 | 21 | [--exec-prefix[=DIR]] |
michael@0 | 22 | [--includedir[=DIR]] |
michael@0 | 23 | [--libdir[=DIR]] |
michael@0 | 24 | [--version] |
michael@0 | 25 | [--libs] |
michael@0 | 26 | [--cflags] |
michael@0 | 27 | [--lib-filenames] |
michael@0 | 28 | EOF |
michael@0 | 29 | exit $1 |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | if test $# -eq 0; then |
michael@0 | 33 | usage 1 1>&2 |
michael@0 | 34 | fi |
michael@0 | 35 | |
michael@0 | 36 | while test $# -gt 0; do |
michael@0 | 37 | case "$1" in |
michael@0 | 38 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
michael@0 | 39 | *) optarg= ;; |
michael@0 | 40 | esac |
michael@0 | 41 | |
michael@0 | 42 | case $1 in |
michael@0 | 43 | --prefix=*) |
michael@0 | 44 | prefix=$optarg |
michael@0 | 45 | ;; |
michael@0 | 46 | --prefix) |
michael@0 | 47 | echo_prefix=yes |
michael@0 | 48 | ;; |
michael@0 | 49 | --exec-prefix=*) |
michael@0 | 50 | exec_prefix=$optarg |
michael@0 | 51 | ;; |
michael@0 | 52 | --exec-prefix) |
michael@0 | 53 | echo_exec_prefix=yes |
michael@0 | 54 | ;; |
michael@0 | 55 | --includedir=*) |
michael@0 | 56 | includedir=$optarg |
michael@0 | 57 | ;; |
michael@0 | 58 | --includedir) |
michael@0 | 59 | echo_includedir=yes |
michael@0 | 60 | ;; |
michael@0 | 61 | --libdir=*) |
michael@0 | 62 | libdir=$optarg |
michael@0 | 63 | ;; |
michael@0 | 64 | --libdir) |
michael@0 | 65 | echo_libdir=yes |
michael@0 | 66 | ;; |
michael@0 | 67 | --version) |
michael@0 | 68 | echo "$mozilla_version" |
michael@0 | 69 | ;; |
michael@0 | 70 | --cflags) |
michael@0 | 71 | echo_cflags=yes |
michael@0 | 72 | ;; |
michael@0 | 73 | --libs) |
michael@0 | 74 | echo_libs=yes |
michael@0 | 75 | ;; |
michael@0 | 76 | *) |
michael@0 | 77 | usage 1 1>&2 |
michael@0 | 78 | ;; |
michael@0 | 79 | esac |
michael@0 | 80 | shift |
michael@0 | 81 | done |
michael@0 | 82 | |
michael@0 | 83 | # Set variables that may be dependent upon other variables |
michael@0 | 84 | if test -z "$exec_prefix"; then |
michael@0 | 85 | exec_prefix=@exec_prefix@ |
michael@0 | 86 | fi |
michael@0 | 87 | if test -z "$includedir"; then |
michael@0 | 88 | includedir=@includedir@ |
michael@0 | 89 | fi |
michael@0 | 90 | if test -z "$libdir"; then |
michael@0 | 91 | libdir=@libdir@ |
michael@0 | 92 | fi |
michael@0 | 93 | |
michael@0 | 94 | if test "$echo_prefix" = "yes"; then |
michael@0 | 95 | echo $prefix |
michael@0 | 96 | fi |
michael@0 | 97 | |
michael@0 | 98 | if test "$echo_exec_prefix" = "yes"; then |
michael@0 | 99 | echo $exec_prefix |
michael@0 | 100 | fi |
michael@0 | 101 | |
michael@0 | 102 | if test "$echo_includedir" = "yes"; then |
michael@0 | 103 | echo $includedir |
michael@0 | 104 | fi |
michael@0 | 105 | |
michael@0 | 106 | if test "$echo_libdir" = "yes"; then |
michael@0 | 107 | echo $libdir |
michael@0 | 108 | fi |
michael@0 | 109 | |
michael@0 | 110 | if test "$echo_cflags" = "yes"; then |
michael@0 | 111 | echo "-std=gnu++0x -include $includedir/$JS_LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$JS_LIBRARY_NAME $NSPR_CFLAGS" |
michael@0 | 112 | fi |
michael@0 | 113 | |
michael@0 | 114 | if test "$echo_libs" = "yes"; then |
michael@0 | 115 | echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS" |
michael@0 | 116 | fi |