michael@0: #!/bin/sh michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: prefix='@prefix@' michael@0: mozilla_version='@MOZILLA_VERSION@' michael@0: JS_LIBRARY_NAME='@JS_LIBRARY_NAME@' michael@0: NSPR_CFLAGS='@NSPR_CFLAGS@' michael@0: JS_CONFIG_LIBS='@JS_CONFIG_LIBS@' michael@0: MOZ_JS_LIBS='@JS_CONFIG_MOZ_JS_LIBS@' michael@0: michael@0: FILENAME=`basename "$0"` michael@0: michael@0: usage() michael@0: { michael@0: cat <&2 michael@0: fi michael@0: michael@0: while test $# -gt 0; do michael@0: case "$1" in michael@0: -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; michael@0: *) optarg= ;; michael@0: esac michael@0: michael@0: case $1 in michael@0: --prefix=*) michael@0: prefix=$optarg michael@0: ;; michael@0: --prefix) michael@0: echo_prefix=yes michael@0: ;; michael@0: --exec-prefix=*) michael@0: exec_prefix=$optarg michael@0: ;; michael@0: --exec-prefix) michael@0: echo_exec_prefix=yes michael@0: ;; michael@0: --includedir=*) michael@0: includedir=$optarg michael@0: ;; michael@0: --includedir) michael@0: echo_includedir=yes michael@0: ;; michael@0: --libdir=*) michael@0: libdir=$optarg michael@0: ;; michael@0: --libdir) michael@0: echo_libdir=yes michael@0: ;; michael@0: --version) michael@0: echo "$mozilla_version" michael@0: ;; michael@0: --cflags) michael@0: echo_cflags=yes michael@0: ;; michael@0: --libs) michael@0: echo_libs=yes michael@0: ;; michael@0: *) michael@0: usage 1 1>&2 michael@0: ;; michael@0: esac michael@0: shift michael@0: done michael@0: michael@0: # Set variables that may be dependent upon other variables michael@0: if test -z "$exec_prefix"; then michael@0: exec_prefix=@exec_prefix@ michael@0: fi michael@0: if test -z "$includedir"; then michael@0: includedir=@includedir@ michael@0: fi michael@0: if test -z "$libdir"; then michael@0: libdir=@libdir@ michael@0: fi michael@0: michael@0: if test "$echo_prefix" = "yes"; then michael@0: echo $prefix michael@0: fi michael@0: michael@0: if test "$echo_exec_prefix" = "yes"; then michael@0: echo $exec_prefix michael@0: fi michael@0: michael@0: if test "$echo_includedir" = "yes"; then michael@0: echo $includedir michael@0: fi michael@0: michael@0: if test "$echo_libdir" = "yes"; then michael@0: echo $libdir michael@0: fi michael@0: michael@0: if test "$echo_cflags" = "yes"; then michael@0: echo "-std=gnu++0x -include $includedir/$JS_LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$JS_LIBRARY_NAME $NSPR_CFLAGS" michael@0: fi michael@0: michael@0: if test "$echo_libs" = "yes"; then michael@0: echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS" michael@0: fi