Bumping manifests a=b2g-bump
[gecko.git] / js / src / js-config.in
blobfc6df0a28c7c79cd37dfb3b43434d3c38b7681e6
1 #!/bin/sh
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 prefix='@prefix@'
7 mozilla_version='@MOZILLA_VERSION@'
8 JS_LIBRARY_NAME='@JS_LIBRARY_NAME@'
9 NSPR_CFLAGS='@NSPR_CFLAGS@'
10 JS_CONFIG_LIBS='@JS_CONFIG_LIBS@'
11 MOZ_JS_LIBS='@JS_CONFIG_MOZ_JS_LIBS@'
13 FILENAME=`basename "$0"`
15 usage()
17 cat <<EOF
18 Usage: $FILENAME [OPTIONS]
19 Options:
20 [--prefix[=DIR]]
21 [--exec-prefix[=DIR]]
22 [--includedir[=DIR]]
23 [--libdir[=DIR]]
24 [--version]
25 [--libs]
26 [--cflags]
27 [--lib-filenames]
28 EOF
29 exit $1
32 if test $# -eq 0; then
33 usage 1 1>&2
36 while test $# -gt 0; do
37 case "$1" in
38 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
39 *) optarg= ;;
40 esac
42 case $1 in
43 --prefix=*)
44 prefix=$optarg
46 --prefix)
47 echo_prefix=yes
49 --exec-prefix=*)
50 exec_prefix=$optarg
52 --exec-prefix)
53 echo_exec_prefix=yes
55 --includedir=*)
56 includedir=$optarg
58 --includedir)
59 echo_includedir=yes
61 --libdir=*)
62 libdir=$optarg
64 --libdir)
65 echo_libdir=yes
67 --version)
68 echo "$mozilla_version"
70 --cflags)
71 echo_cflags=yes
73 --libs)
74 echo_libs=yes
77 usage 1 1>&2
79 esac
80 shift
81 done
83 # Set variables that may be dependent upon other variables
84 if test -z "$exec_prefix"; then
85 exec_prefix=@exec_prefix@
87 if test -z "$includedir"; then
88 includedir=@includedir@
90 if test -z "$libdir"; then
91 libdir=@libdir@
94 if test "$echo_prefix" = "yes"; then
95 echo $prefix
98 if test "$echo_exec_prefix" = "yes"; then
99 echo $exec_prefix
102 if test "$echo_includedir" = "yes"; then
103 echo $includedir
106 if test "$echo_libdir" = "yes"; then
107 echo $libdir
110 if test "$echo_cflags" = "yes"; then
111 echo "-std=gnu++0x -include $includedir/$JS_LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$JS_LIBRARY_NAME $NSPR_CFLAGS"
114 if test "$echo_libs" = "yes"; then
115 echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS"